AsymmetricBlockCipherpublic class ISO9796d1Encoding extends java.lang.Object implements AsymmetricBlockCipher
| Constructor | Description |
|---|---|
ISO9796d1Encoding(AsymmetricBlockCipher cipher) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getInputBlockSize() |
return the input block size.
|
int |
getOutputBlockSize() |
return the maximum possible size for the output.
|
int |
getPadBits() |
retrieve the number of pad bits in the last decoded message.
|
AsymmetricBlockCipher |
getUnderlyingCipher() |
|
void |
init(boolean forEncryption,
CipherParameters param) |
initialise the cipher.
|
byte[] |
processBlock(byte[] in,
int inOff,
int inLen) |
process the block of len bytes stored in in from offset inOff.
|
void |
setPadBits(int padBits) |
set the number of bits in the next message to be treated as
pad bits.
|
public ISO9796d1Encoding(AsymmetricBlockCipher cipher)
public AsymmetricBlockCipher getUnderlyingCipher()
public void init(boolean forEncryption,
CipherParameters param)
AsymmetricBlockCipherinit in interface AsymmetricBlockCipherforEncryption - if true the cipher is initialised for
encryption, if false for decryption.param - the key and other data required by the cipher.public int getInputBlockSize()
getInputBlockSize in interface AsymmetricBlockCipherpublic int getOutputBlockSize()
getOutputBlockSize in interface AsymmetricBlockCipherpublic void setPadBits(int padBits)
public int getPadBits()
public byte[] processBlock(byte[] in,
int inOff,
int inLen)
throws InvalidCipherTextException
AsymmetricBlockCipherprocessBlock in interface AsymmetricBlockCipherin - the input datainOff - offset into the in array where the data startsinLen - the length of the block to be processed.InvalidCipherTextException - data decrypts improperly.