Table of Contents

Class BufferedStreamCipher

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

Constructors

BufferedStreamCipher(IStreamCipher)

public BufferedStreamCipher(IStreamCipher cipher)

Parameters

cipher IStreamCipher

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public override string AlgorithmName { get; }

Property Value

string

Methods

DoFinal()

public override byte[] DoFinal()

Returns

byte[]

DoFinal(byte[], int, int)

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

Parameters

input byte[]
inOff int
length int

Returns

byte[]

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

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

Parameters

input ReadOnlySpan<byte>
output Span<byte>

Returns

int

DoFinal(Span<byte>)

public override int DoFinal(Span<byte> output)

Parameters

output Span<byte>

Returns

int

GetBlockSize()

public override int GetBlockSize()

Returns

int

GetOutputSize(int)

public override int GetOutputSize(int inputLen)

Parameters

inputLen int

Returns

int

GetUpdateOutputSize(int)

public override int GetUpdateOutputSize(int inputLen)

Parameters

inputLen int

Returns

int

Init(bool, ICipherParameters)

Initialise the cipher.

public override 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 override byte[] ProcessByte(byte input)

Parameters

input byte

Returns

byte[]

ProcessByte(byte, byte[], int)

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

Parameters

input byte
output byte[]
outOff int

Returns

int

ProcessByte(byte, Span<byte>)

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

Parameters

input byte
output Span<byte>

Returns

int

ProcessBytes(byte[], int, int)

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

Parameters

input byte[]
inOff int
length int

Returns

byte[]

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

public override 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 override 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 override void Reset()