public static String encryptMD5(String data) {
        try {
            var digest = MessageDigest.getInstance("MD5");
            return copyValueOf(Hex.encodeHex(digest.digest(data.getBytes(StandardCharsets.UTF_8))));
        } catch (final NoSuchAlgorithmException ex) {
            throw new TechnicalException("Failed to instantiate an MD5 algorithm", ex);
        }
    }
Defined in rfc 2617 as H(data) = MD5(data);

@param data data
@return MD5(data)
pac4j-http/src/main/java/org/pac4j/http/credentials/CredentialUtil.java