org.bouncycastle.crypto
Interface AsymmetricBlockCipher
- ElGamalEngine, ISO9796d1Encoding, NaccacheSternEngine, OAEPEncoding, PKCS1Encoding, RSABlindedEngine, RSABlindingEngine, RSAEngine
public interface AsymmetricBlockCipher
base interface that a public/private key block cipher needs
to conform to.
int | getInputBlockSize() - returns the largest size an input block can be.
|
int | getOutputBlockSize() - returns the maximum size of the block produced by this cipher.
|
void | init(boolean forEncryption, CipherParameters param) - initialise the cipher.
|
byte[] | processBlock(byte[] in, int inOff, int len) - process the block of len bytes stored in in from offset inOff.
|
getInputBlockSize
public int getInputBlockSize()
returns the largest size an input block can be.
- maximum size for an input block.
getOutputBlockSize
public int getOutputBlockSize()
returns the maximum size of the block produced by this cipher.
- maximum size of the output block produced by the cipher.
init
public void init(boolean forEncryption,
CipherParameters param)
initialise the cipher.
forEncryption
- if true the cipher is initialised for
encryption, if false for decryption.param
- the key and other data required by the cipher.
processBlock
public byte[] processBlock(byte[] in,
int inOff,
int len)
throws InvalidCipherTextException
process the block of len bytes stored in in from offset inOff.
in
- the input datainOff
- offset into the in array where the data startslen
- the length of the block to be processed.
- the resulting byte array of the encryption/decryption process.