public static String createDigest(String token, String password) {
        synchronized (DIGEST_LOCK) {
            digest.update(token.getBytes());
            return StringUtils.encodeHex(digest.digest(password.getBytes()));
        }
    }
Returns a digest given a token and password, according to JEP-0078.

@param token the token used in the digest.
@param password the plain-text password to be digested.
@return the digested result as a hex string.
xmppserver/src/main/java/org/jivesoftware/openfire/auth/AuthFactory.java