public static byte[] rawDigest(final String alg, final String salt, final String... data) {
        try {
            val digest = getMessageDigestInstance(alg);
            Arrays.stream(data)
                .filter(StringUtils::isNotBlank)
                .forEach(d -> digest.update(d.getBytes(StandardCharsets.UTF_8)));
            return digest.digest(salt.getBytes(StandardCharsets.UTF_8));
        } catch (final Exception cause) {
            throw new SecurityException(cause);
        }
    }
Raw digest byte [ ].

@param alg  the alg
@param salt the salt
@param data the data
@return the byte [ ]
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java