List of usage examples for org.bouncycastle.crypto BufferedAsymmetricBlockCipher BufferedAsymmetricBlockCipher
public BufferedAsymmetricBlockCipher(AsymmetricBlockCipher cipher)
From source file:org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher.java
License:Open Source License
/** * Create a new Bouncy Castle based asymmetric cipher. * * @param cipher the native cipher to encapsulate. * @param forEncryption true is the cipher should be initialized for encryption. * @param parameters the cipher parameters in bouncy castle format. * @param algorithmName the name to report for the algorithm of this cipher. *///from ww w . j a v a 2 s. c om public BcBufferedAsymmetricCipher(AsymmetricBlockCipher cipher, boolean forEncryption, CipherParameters parameters, String algorithmName) { this.cipher = new BufferedAsymmetricBlockCipher(cipher); this.forEncryption = forEncryption; this.algorithmName = algorithmName; this.cipher.init(forEncryption, parameters); }