Table of Contents

Class BufferedCipherWrapper

Namespace
Org.BouncyCastle.Crypto.Operators
Assembly
BouncyCastle.Cryptography.dll
public class BufferedCipherWrapper : ICipher
Inheritance
BufferedCipherWrapper
Implements
Inherited Members

Constructors

BufferedCipherWrapper(IBufferedCipher, Stream)

public BufferedCipherWrapper(IBufferedCipher bufferedCipher, Stream source)

Parameters

bufferedCipher IBufferedCipher
source Stream

Properties

Stream

Gets the stream for reading/writing data processed/to be processed.

public Stream Stream { get; }

Property Value

Stream

The stream associated with this cipher.

Methods

GetMaxOutputSize(int)

Return the size of the output buffer required for a Write() plus a close() with the write() being passed inputLen bytes.

The returned size may be dependent on the initialisation of this cipher and may not be accurate once subsequent input data is processed as the cipher may add, add or remove padding, as it sees fit.

public int GetMaxOutputSize(int inputLen)

Parameters

inputLen int

The length of the expected input.

Returns

int

The space required to accommodate a call to processBytes and doFinal with inputLen bytes of input.

GetUpdateOutputSize(int)

Return the size of the output buffer required for a write() with the write() being passed inputLen bytes and just updating the cipher output.

public int GetUpdateOutputSize(int inputLen)

Parameters

inputLen int

The length of the expected input.

Returns

int

The space required to accommodate a call to processBytes with inputLen bytes of input.