public static void setupPropertyEncryptionAlgorithm(String alg) {
        // Get the old secret key and encryption type
        String oldAlg = securityProperties.getProperty(ENCRYPTION_ALGORITHM);
        String oldKey = getCurrentKey();
        if (StringUtils.isNotEmpty(alg) && !oldAlg.equals(alg) && (StringUtils.isNotEmpty(oldKey) || propertyEncryptor != null)) {
            // update encrypted properties
            updateEncryptionProperties(alg, oldKey);
        }
        // Set the new algorithm
        if (ENCRYPTION_ALGORITHM_AES.equalsIgnoreCase(alg)) {
            securityProperties.setProperty(ENCRYPTION_ALGORITHM, ENCRYPTION_ALGORITHM_AES);
        } else {
            securityProperties.setProperty(ENCRYPTION_ALGORITHM, ENCRYPTION_ALGORITHM_BLOWFISH);
        }
    }
This method is called early during the setup process to
set the algorithm for encrypting property values 
@param alg the algorithm used to encrypt properties
xmppserver/src/main/java/org/jivesoftware/util/JiveGlobals.java