protected String hashPassword(String password, PasswordType type) {
        switch (type) {
            case md5:
                return StringUtils.hash(password, "MD5");
            case sha1:
                return StringUtils.hash(password, "SHA-1");
            case sha256:
                return StringUtils.hash(password, "SHA-256");
            case sha512:
                return StringUtils.hash(password, "SHA-512");
            case bcrypt:
                byte[] salt = new byte[16];
                new SecureRandom().nextBytes(salt);
                int cost = (bcryptCost < 4 || bcryptCost > 31) ? DEFAULT_BCRYPT_COST : bcryptCost;
                return OpenBSDBCrypt.generate(password.toCharArray(), salt, cost);
            case nt:
                try {
                  MessageDigest md = MessageDigest.getInstance("MD4");
                  byte[] utf16leBytes = password.getBytes(StandardCharsets.UTF_16LE);
                  byte[] digestBytes = md.digest(utf16leBytes);
                  return new String( Hex.encode( digestBytes ) );
                }
                catch (Exception e) {
                  return null;
                }
            case plain:
            default:
                return password;
        }
    }
XMPP disallows some characters in identifiers, requiring them to be escaped.

This implementation assumes that the database returns properly escaped identifiers,
but can apply escaping by setting the value of the 'jdbcAuthProvider.isEscaped'
property to 'false'.

@return 'false' if this implementation needs to escape database content before processing.
xmppserver/src/main/java/org/jivesoftware/openfire/auth/JDBCAuthProvider.java