public static byte[] rawDigestSha256(final String data) {
        try {
            return rawDigest(MessageDigestAlgorithms.SHA_256, data.getBytes(StandardCharsets.UTF_8));
        } catch (final Exception cause) {
            throw new SecurityException(cause);
        }
    }
Computes digest.

@param data data to be hashed
@return hash byte []
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java