class CredentialUtil {

    /**
     * Defined in rfc 2617 as H(data) = MD5(data);
     *
     * @param data data
     * @return MD5(data)
     */
    public static String encryptMD5(String data) {<FILL_FUNCTION_BODY>}

    /**
     * Defined in rfc 2617 as KD(secret, data) = H(concat(secret, ":", data))
     *
     * @param data data
     * @param secret secret
     * @return H(concat(secret, ":", data));
     */
    public static String encryptMD5(String secret, String data) {
        return encryptMD5(secret + ":" + 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);
        }
    
<no_super_class>