private static void setupPropertyEncryption() {
        
        // get/set the current encryption key
        currentKey = getCurrentKey();
        
        // check to see if a new key has been defined
        String newKey = securityProperties.getProperty(ENCRYPTION_KEY_NEW, false);
        if (newKey != null) {
            
            Log.info("Detected new encryption key; updating encrypted properties");

            // if a new key has been provided, check to see if the old key matches 
            // the current key, otherwise log an error and ignore the new key
            String oldKey = securityProperties.getProperty(ENCRYPTION_KEY_OLD);
            if (oldKey == null) {
                if (currentKey != null) {
                    Log.warn("Old encryption key was not provided; ignoring new encryption key");
                    return;
                }
            } else {
                if (!oldKey.equals(currentKey)) {
                    Log.warn("Old encryption key does not match current encryption key; ignoring new encryption key");
                    return;
                }
            }

            String oldAlg = securityProperties.getProperty(ENCRYPTION_ALGORITHM);
            updateEncryptionProperties(oldAlg, newKey);
            
            securityProperties.deleteProperty(ENCRYPTION_KEY_NEW);
            securityProperties.deleteProperty(ENCRYPTION_KEY_OLD);
        }
    
        // (re)write the encryption key to the security XML file
        securityProperties.setProperty(ENCRYPTION_KEY_CURRENT, new AesEncryptor().encrypt(currentKey));
    }
Setup the property encryption key, rewriting encrypted values as appropriate
xmppserver/src/main/java/org/jivesoftware/util/JiveGlobals.java