Table of Contents

Class BufferedCipherBase

Namespace
Org.BouncyCastle.Crypto
Assembly
BouncyCastle.Cryptography.dll
public abstract class BufferedCipherBase : IBufferedCipher
Inheritance
BufferedCipherBase
Implements
Derived
Inherited Members

Fields

EmptyBuffer

protected static readonly byte[] EmptyBuffer

Field Value

byte[]

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public abstract string AlgorithmName { get; }

Property Value

string

Methods

DoFinal()

public abstract byte[] DoFinal()

Returns

byte[]

DoFinal(byte[])

public virtual byte[] DoFinal(byte[] input)

Parameters

input byte[]

Returns

byte[]

DoFinal(byte[], byte[], int)

public virtual int DoFinal(byte[] input, byte[] output, int outOff)

Parameters

input byte[]
output byte[]
outOff int

Returns

int

DoFinal(byte[], int)

public virtual int DoFinal(byte[] output, int outOff)

Parameters

output byte[]
outOff int

Returns

int

DoFinal(byte[], int, int)

public abstract byte[] DoFinal(byte[] input, int inOff, int length)

Parameters

input byte[]
inOff int
length int

Returns

byte[]

DoFinal(byte[], int, int, byte[], int)

public virtual int DoFinal(byte[] input, int inOff, int length, byte[] output, int outOff)

Parameters

input byte[]
inOff int
length int
output byte[]
outOff int

Returns

int

DoFinal(ReadOnlySpan<byte>, Span<byte>)

public virtual int DoFinal(ReadOnlySpan<byte> input, Span<byte> output)

Parameters

input ReadOnlySpan<byte>
output Span<byte>

Returns

int

DoFinal(Span<byte>)

public abstract int DoFinal(Span<byte> output)

Parameters

output Span<byte>

Returns

int

GetBlockSize()

public abstract int GetBlockSize()

Returns

int

GetOutputSize(int)

public abstract int GetOutputSize(int inputLen)

Parameters

inputLen int

Returns

int

GetUpdateOutputSize(int)

public abstract int GetUpdateOutputSize(int inputLen)

Parameters

inputLen int

Returns

int

Init(bool, ICipherParameters)

Initialise the cipher.

public abstract void Init(bool forEncryption, ICipherParameters parameters)

Parameters

forEncryption bool

If true the cipher is initialised for encryption, if false for decryption.

parameters ICipherParameters

The key and other data required by the cipher.

ProcessByte(byte)

public abstract byte[] ProcessByte(byte input)

Parameters

input byte

Returns

byte[]

ProcessByte(byte, byte[], int)

public virtual int ProcessByte(byte input, byte[] output, int outOff)

Parameters

input byte
output byte[]
outOff int

Returns

int

ProcessByte(byte, Span<byte>)

public abstract int ProcessByte(byte input, Span<byte> output)

Parameters

input byte
output Span<byte>

Returns

int

ProcessBytes(byte[])

public virtual byte[] ProcessBytes(byte[] input)

Parameters

input byte[]

Returns

byte[]

ProcessBytes(byte[], byte[], int)

public virtual int ProcessBytes(byte[] input, byte[] output, int outOff)

Parameters

input byte[]
output byte[]
outOff int

Returns

int

ProcessBytes(byte[], int, int)

public abstract byte[] ProcessBytes(byte[] input, int inOff, int length)

Parameters

input byte[]
inOff int
length int

Returns

byte[]

ProcessBytes(byte[], int, int, byte[], int)

public virtual int ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff)

Parameters

input byte[]
inOff int
length int
output byte[]
outOff int

Returns

int

ProcessBytes(ReadOnlySpan<byte>, Span<byte>)

public abstract int ProcessBytes(ReadOnlySpan<byte> input, Span<byte> output)

Parameters

input ReadOnlySpan<byte>
output Span<byte>

Returns

int

Reset()

Reset the cipher. After resetting the cipher is in the same state as it was after the last init (if there was one).

public abstract void Reset()