org.bouncycastle.crypto.encodings
Class OAEPEncoding
java.lang.Object
org.bouncycastle.crypto.encodings.OAEPEncoding
- AsymmetricBlockCipher
public class OAEPEncoding
extends java.lang.Object
Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2.
getOutputBlockSize
public int getOutputBlockSize()
returns the maximum size of the block produced by this cipher.
- getOutputBlockSize in interface AsymmetricBlockCipher
- maximum size of the output block produced by the cipher.
init
public void init(boolean forEncryption,
CipherParameters param)
initialise the cipher.
- init in interface AsymmetricBlockCipher
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 inLen)
throws InvalidCipherTextException
process the block of len bytes stored in in from offset inOff.
- processBlock in interface AsymmetricBlockCipher
in
- the input datainOff
- offset into the in array where the data starts
- the resulting byte array of the encryption/decryption process.