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.

@param md the md
@return the string
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/ShibbolethCompatiblePersistentIdGenerator.java