|
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.OAEPEncoding
Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2.
Constructor Summary | |
OAEPEncoding(AsymmetricBlockCipher cipher)
|
Method Summary | |
byte[] |
decodeBlock(byte[] in,
int inOff,
int inLen)
|
byte[] |
encodeBlock(byte[] in,
int inOff,
int inLen)
|
int |
getInputBlockSize()
returns the largest size an input block can be. |
int |
getOutputBlockSize()
returns the maximum size of the block produced by this cipher. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OAEPEncoding(AsymmetricBlockCipher cipher)
Method Detail |
public AsymmetricBlockCipher getUnderlyingCipher()
public void init(boolean forEncryption, CipherParameters param)
AsymmetricBlockCipher
init
in interface AsymmetricBlockCipher
org.bouncycastle.crypto.AsymmetricBlockCipher
forEncryption
- 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()
AsymmetricBlockCipher
getInputBlockSize
in interface AsymmetricBlockCipher
org.bouncycastle.crypto.AsymmetricBlockCipher
public int getOutputBlockSize()
AsymmetricBlockCipher
getOutputBlockSize
in interface AsymmetricBlockCipher
org.bouncycastle.crypto.AsymmetricBlockCipher
public byte[] processBlock(byte[] in, int inOff, int inLen) throws InvalidCipherTextException
AsymmetricBlockCipher
processBlock
in interface AsymmetricBlockCipher
org.bouncycastle.crypto.AsymmetricBlockCipher
in
- 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.public byte[] encodeBlock(byte[] in, int inOff, int inLen) throws InvalidCipherTextException
public byte[] decodeBlock(byte[] in, int inOff, int inLen) throws InvalidCipherTextException
InvalidCipherTextException
- if the decryypted block turns out to
be badly formatted.
|
Bouncy Castle Cryptography 1.11 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |