public static String digest(final String alg, final String data) {
        return digest(alg, data.getBytes(StandardCharsets.UTF_8));
    }
Computes hex encoded digest.

@param alg  Digest algorithm to use
@param data data to be hashed
@return hex encoded hash
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java