private static Encryptor getEncryptor(String alg, String key) {
        Encryptor encryptor;
        if (ENCRYPTION_ALGORITHM_AES.equalsIgnoreCase(alg)) {
            encryptor = new AesEncryptor(key);
        } else {
            encryptor = new Blowfish(key);
        }
        return encryptor;
    }
Get current encryptor according to alg and key.

@param alg algorithm type
@param key encryptor key
xmppserver/src/main/java/org/jivesoftware/util/JiveGlobals.java