Table of Contents

Class Pkcs1Encoding

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

Constructors

Pkcs1Encoding(IAsymmetricBlockCipher)

public Pkcs1Encoding(IAsymmetricBlockCipher cipher)

Parameters

cipher IAsymmetricBlockCipher

Pkcs1Encoding(IAsymmetricBlockCipher, byte[])

public Pkcs1Encoding(IAsymmetricBlockCipher cipher, byte[] fallback)

Parameters

cipher IAsymmetricBlockCipher
fallback byte[]

Pkcs1Encoding(IAsymmetricBlockCipher, int)

public Pkcs1Encoding(IAsymmetricBlockCipher cipher, int pLen)

Parameters

cipher IAsymmetricBlockCipher
pLen int

Fields

StrictLengthEnabledProperty

public const string StrictLengthEnabledProperty = "Org.BouncyCastle.Pkcs1.Strict"

Field Value

string

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public string AlgorithmName { get; }

Property Value

string

StrictLengthEnabled

public static bool StrictLengthEnabled { get; set; }

Property Value

bool

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[] input, int inOff, int length)

Parameters

input byte[]
inOff int

The offset into that the input block begins.

length int

Returns

byte[]

Exceptions

InvalidCipherTextException

Input decrypts improperly.

DataLengthException

Input is too large for the cipher.