Table of Contents

Class OaepEncoding

Namespace
Org.BouncyCastle.Crypto.Encodings
Assembly
BouncyCastle.Cryptography.dll
public class OaepEncoding : IAsymmetricBlockCipher
Inheritance
OaepEncoding
Implements
Inherited Members

Constructors

OaepEncoding(IAsymmetricBlockCipher)

public OaepEncoding(IAsymmetricBlockCipher cipher)

Parameters

cipher IAsymmetricBlockCipher

OaepEncoding(IAsymmetricBlockCipher, IDigest)

public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash)

Parameters

cipher IAsymmetricBlockCipher
hash IDigest

OaepEncoding(IAsymmetricBlockCipher, IDigest, IDigest, byte[])

public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash, IDigest mgf1Hash, byte[] encodingParams)

Parameters

cipher IAsymmetricBlockCipher
hash IDigest
mgf1Hash IDigest
encodingParams byte[]

OaepEncoding(IAsymmetricBlockCipher, IDigest, byte[])

public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash, byte[] encodingParams)

Parameters

cipher IAsymmetricBlockCipher
hash IDigest
encodingParams byte[]

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public string AlgorithmName { get; }

Property Value

string

UnderlyingCipher

public IAsymmetricBlockCipher UnderlyingCipher { get; }

Property Value

IAsymmetricBlockCipher

Methods

GetInputBlockSize()

public int GetInputBlockSize()

Returns

int

The maximum size, in bytes, an input block may be.

GetOutputBlockSize()

public int GetOutputBlockSize()

Returns

int

The maximum size, in bytes, an output block will be.

Init(bool, ICipherParameters)

Initialise the cipher.

public void Init(bool forEncryption, ICipherParameters parameters)

Parameters

forEncryption bool

Initialise for encryption if true, for decryption if false.

parameters ICipherParameters

The key or other data required by the cipher.

ProcessBlock(byte[], int, int)

Process a block.

public byte[] ProcessBlock(byte[] inBytes, int inOff, int inLen)

Parameters

inBytes byte[]
inOff int

The offset into that the input block begins.

inLen int

The length of the input block.

Returns

byte[]

Exceptions

InvalidCipherTextException

Input decrypts improperly.

DataLengthException

Input is too large for the cipher.