encryptor.setProvider(new BouncyCastleProvider());
encryptor.setPassword(SEED_BC);
encryptor.setAlgorithm("PBEWITHSHA256AND128BITAES-CBC-BC");
encryptedPassword = encryptor.encrypt(text);
} else {
throw new EncryptDecryptUtilException(
"Error can not determine the type of encryption algorithm to use");
}
LOG.info("Encryption done and encrypted password is : "
+ encryptedPassword);
return encryptedPassword;