Example usage for org.bouncycastle.crypto BufferedAsymmetricBlockCipher BufferedAsymmetricBlockCipher

List of usage examples for org.bouncycastle.crypto BufferedAsymmetricBlockCipher BufferedAsymmetricBlockCipher

Introduction

In this page you can find the example usage for org.bouncycastle.crypto BufferedAsymmetricBlockCipher BufferedAsymmetricBlockCipher.

Prototype

public BufferedAsymmetricBlockCipher(AsymmetricBlockCipher cipher) 

Source Link

Document

base constructor.

Usage

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);
}