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
cipherIAsymmetricBlockCipher
OaepEncoding(IAsymmetricBlockCipher, IDigest)
public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash)
Parameters
cipherIAsymmetricBlockCipherhashIDigest
OaepEncoding(IAsymmetricBlockCipher, IDigest, IDigest, byte[])
public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash, IDigest mgf1Hash, byte[] encodingParams)
Parameters
cipherIAsymmetricBlockCipherhashIDigestmgf1HashIDigestencodingParamsbyte[]
OaepEncoding(IAsymmetricBlockCipher, IDigest, byte[])
public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash, byte[] encodingParams)
Parameters
cipherIAsymmetricBlockCipherhashIDigestencodingParamsbyte[]
Properties
AlgorithmName
The name of the algorithm this cipher implements.
public string AlgorithmName { get; }
Property Value
UnderlyingCipher
public IAsymmetricBlockCipher UnderlyingCipher { get; }
Property Value
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
forEncryptionboolInitialise for encryption if true, for decryption if false.
parametersICipherParametersThe 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
inBytesbyte[]inOffintThe offset into that the input block begins.
inLenintThe length of the input block.
Returns
- byte[]
Exceptions
- InvalidCipherTextException
Input decrypts improperly.
- DataLengthException
Input is too large for the cipher.