protected String digestAndEncodeWithSalt ( final MessageDigest md ) { val sanitizedSalt = StringUtils . replace ( salt , "\n" , " " ) ; val digested = md . digest ( sanitizedSalt . getBytes ( StandardCharsets . UTF_8 ) ) ; return EncodingUtils . encodeBase64 ( digested , false ) ; }
Digest and encode with salt string .