code: 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);
      }
docs: Digest and encode with salt string.
  
  @param md the md
  @return the string