Provider provider, int keySize)
throws InvalidKeyException, NoSuchAlgorithmException,
NoSuchPaddingException, TransformException {
if(provider == null) {
factory = new BasicEncryptionTransformFactory(masterEncryptionKey, decryptionKeys);
} else {
factory = new BasicEncryptionTransformFactory(masterEncryptionKey, decryptionKeys, provider);
}
factory.setEncryptionSettings(TransformConstants.DEFAULT_ENCRYPTION_TRANSFORM, keySize, provider);
}