public static byte[] rawDigest(final String alg, final byte[] data) {
        try {
            val digest = getMessageDigestInstance(alg);
            return digest.digest(data);
        } catch (final Exception cause) {
            throw new SecurityException(cause);
        }
    }
Raw digest.

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