Table of Contents

Interface IBufferedCipher

Namespace
Org.BouncyCastle.Crypto
Assembly
BouncyCastle.Cryptography.dll
public interface IBufferedCipher

Remarks

Block cipher engines are expected to conform to this interface.

Properties

AlgorithmName

The name of the algorithm this cipher implements.

string AlgorithmName { get; }

Property Value

string

Methods

DoFinal()

byte[] DoFinal()

Returns

byte[]

DoFinal(byte[])

byte[] DoFinal(byte[] input)

Parameters

input byte[]

Returns

byte[]

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

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

Parameters

input byte[]
output byte[]
outOff int

Returns

int

DoFinal(byte[], int)

int DoFinal(byte[] output, int outOff)

Parameters

output byte[]
outOff int

Returns

int

DoFinal(byte[], int, int)

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

Parameters

input byte[]
inOff int
length int

Returns

byte[]

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

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>)

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

Parameters

input ReadOnlySpan<byte>
output Span<byte>

Returns

int

DoFinal(Span<byte>)

int DoFinal(Span<byte> output)

Parameters

output Span<byte>

Returns

int

GetBlockSize()

int GetBlockSize()

Returns

int

GetOutputSize(int)

int GetOutputSize(int inputLen)

Parameters

inputLen int

Returns

int

GetUpdateOutputSize(int)

int GetUpdateOutputSize(int inputLen)

Parameters

inputLen int

Returns

int

Init(bool, ICipherParameters)

Initialise the cipher.

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)

byte[] ProcessByte(byte input)

Parameters

input byte

Returns

byte[]

ProcessByte(byte, byte[], int)

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

Parameters

input byte
output byte[]
outOff int

Returns

int

ProcessByte(byte, Span<byte>)

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

Parameters

input byte
output Span<byte>

Returns

int

ProcessBytes(byte[])

byte[] ProcessBytes(byte[] input)

Parameters

input byte[]

Returns

byte[]

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

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

Parameters

input byte[]
output byte[]
outOff int

Returns

int

ProcessBytes(byte[], int, int)

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

Parameters

input byte[]
inOff int
length int

Returns

byte[]

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

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>)

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).

void Reset()