Bouncy Castle Cryptography 1.11 API Specification: Class ISO9796d1Encoding
|
Bouncy Castle Cryptography 1.11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.bouncycastle.crypto.encodings.ISO9796d1Encoding
ISO 9796-1 padding. Note in the light of recent results you should only use this with RSA (rather than the "simpler" Rabin keys) and you should never use it with anything other than a hash (ie. even if the message is small don't sign the message, sign it's hash) or some "random" value. See your favorite search engine for details.
| Constructor Summary | |
ISO9796d1Encoding(AsymmetricBlockCipher cipher)
|
|
| Method Summary | |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ISO9796d1Encoding(AsymmetricBlockCipher cipher)
| Method Detail |
public AsymmetricBlockCipher getUnderlyingCipher()
public void init(boolean forEncryption,
CipherParameters param)
AsymmetricBlockCipherinit in interface AsymmetricBlockCipherorg.bouncycastle.crypto.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 AsymmetricBlockCipherorg.bouncycastle.crypto.AsymmetricBlockCipherpublic int getOutputBlockSize()
getOutputBlockSize in interface AsymmetricBlockCipherorg.bouncycastle.crypto.AsymmetricBlockCipherpublic void setPadBits(int padBits)
public int getPadBits()
public byte[] processBlock(byte[] in,
int inOff,
int inLen)
throws InvalidCipherTextException
AsymmetricBlockCipherprocessBlock in interface AsymmetricBlockCipherorg.bouncycastle.crypto.AsymmetricBlockCipherin - the input datainOff - offset into the in array where the data startslen - the length of the block to be processed.InvalidCipherTextException - data decrypts improperly.DataLengthException - the input data is too large for the cipher.
|
Bouncy Castle Cryptography 1.11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||