public static String rawDigest(final String alg, final byte[] staticSalt, final byte[] dynamicSalt,
                                   final String value, final long iterations) {
        try {
            val salt = new byte[staticSalt.length + dynamicSalt.length];
            System.arraycopy(staticSalt, 0, salt, 0, staticSalt.length);
            System.arraycopy(dynamicSalt, 0, salt, staticSalt.length, dynamicSalt.length);
            val digest = getMessageDigestInstance(alg);
            digest.update(salt);

            var hashedPassword = digest.digest(value.getBytes(StandardCharsets.UTF_8));
            for (var i = 0; i < iterations - 1; i++) {
                hashedPassword = digest.digest(hashedPassword);
            }
            return EncodingUtils.hexEncode(hashedPassword);
        } catch (final Exception cause) {
            throw new SecurityException(cause);
        }
    }
Raw digest string.

@param alg         the alg
@param staticSalt  the static salt
@param dynamicSalt the dynamic salt
@param value       the value
@param iterations  the iterations
@return the string
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java