List of usage examples for org.bouncycastle.asn1.pkcs RC2CBCParameter RC2CBCParameter
public RC2CBCParameter(int parameterVersion, byte[] iv)
From source file:org.xwiki.crypto.password.internal.pbe.factory.BcPBES2Rc2CipherFactory.java
License:Open Source License
@Override protected PasswordBasedCipher getPasswordBasedCipher(boolean forEncryption, KeyDerivationFunction kdf, SymmetricCipherParameters params) { return new AbstractBcPBES2Cipher(getCipherFactory().getInstance(forEncryption, params), kdf, params) { @Override/*from w w w. j ava2 s . c o m*/ protected EncryptionScheme getScheme(SymmetricCipherParameters parameters) { return new EncryptionScheme(PKCSObjectIdentifiers.RC2_CBC, new RC2CBCParameter(getRC2Version((KeyWithIVParameters) parameters), ((KeyWithIVParameters) parameters).getIV())); } }; }