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
cipherIAsymmetricBlockCipher
Pkcs1Encoding(IAsymmetricBlockCipher, byte[])
public Pkcs1Encoding(IAsymmetricBlockCipher cipher, byte[] fallback)
Parameters
cipherIAsymmetricBlockCipherfallbackbyte[]
Pkcs1Encoding(IAsymmetricBlockCipher, int)
public Pkcs1Encoding(IAsymmetricBlockCipher cipher, int pLen)
Parameters
cipherIAsymmetricBlockCipherpLenint
Fields
StrictLengthEnabledProperty
public const string StrictLengthEnabledProperty = "Org.BouncyCastle.Pkcs1.Strict"
Field Value
Properties
AlgorithmName
The name of the algorithm this cipher implements.
public string AlgorithmName { get; }
Property Value
StrictLengthEnabled
public static bool StrictLengthEnabled { get; set; }
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[] input, int inOff, int length)
Parameters
Returns
- byte[]
Exceptions
- InvalidCipherTextException
Input decrypts improperly.
- DataLengthException
Input is too large for the cipher.