public static byte[] computeHmac(final byte[] key, final String string)
            throws SaslException {
        Mac mac = createSha1Hmac(key);
        mac.update(string.getBytes(StandardCharsets.UTF_8));
        return mac.doFinal();
    }
A utility class that provides methods that are useful for dealing with
Salted Challenge Response Authentication Mechanism (SCRAM).

@author Richard Midwinter
xmppserver/src/main/java/org/jivesoftware/openfire/auth/ScramUtils.java