org.bouncycastle.crypto.encodings

Class OAEPEncoding

public class OAEPEncoding extends Object implements AsymmetricBlockCipher

Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2.
Constructor Summary
OAEPEncoding(AsymmetricBlockCipher cipher)
OAEPEncoding(AsymmetricBlockCipher cipher, Digest hash)
OAEPEncoding(AsymmetricBlockCipher cipher, Digest hash, byte[] encodingParams)
Method Summary
byte[]decodeBlock(byte[] in, int inOff, int inLen)
byte[]encodeBlock(byte[] in, int inOff, int inLen)
intgetInputBlockSize()
intgetOutputBlockSize()
AsymmetricBlockCiphergetUnderlyingCipher()
voidinit(boolean forEncryption, CipherParameters param)
byte[]processBlock(byte[] in, int inOff, int inLen)

Constructor Detail

OAEPEncoding

public OAEPEncoding(AsymmetricBlockCipher cipher)

OAEPEncoding

public OAEPEncoding(AsymmetricBlockCipher cipher, Digest hash)

OAEPEncoding

public OAEPEncoding(AsymmetricBlockCipher cipher, Digest hash, byte[] encodingParams)

Method Detail

decodeBlock

public byte[] decodeBlock(byte[] in, int inOff, int inLen)

Throws: InvalidCipherTextException if the decrypted block turns out to be badly formatted.

encodeBlock

public byte[] encodeBlock(byte[] in, int inOff, int inLen)

getInputBlockSize

public int getInputBlockSize()

getOutputBlockSize

public int getOutputBlockSize()

getUnderlyingCipher

public AsymmetricBlockCipher getUnderlyingCipher()

init

public void init(boolean forEncryption, CipherParameters param)

processBlock

public byte[] processBlock(byte[] in, int inOff, int inLen)