/**
* Initialize encryption keys
*/
public void initKeys() throws MessageStoreException {
Config config = Config.getConfig();
byte[] salt = config.getSalt();
String passPhrase = config.getPassPhrase();
if (!config.isDefaultPassPhraseModified())
logger.warn("archiving is disabled. encryption password is not set.");
int iterationCount = 17;
String algorithm = config.getPBEAlgorithm(); // "PBEWithMD5AndDES")
// Create the key
try {
KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
key = SecretKeyFactory.getInstance(algorithm).generateSecret(keySpec);