Table of Contents

Class SicBlockCipher

Namespace
Org.BouncyCastle.Crypto.Modes
Assembly
BouncyCastle.Cryptography.dll
public class SicBlockCipher : IBlockCipherMode, IBlockCipher
Inheritance
SicBlockCipher
Implements
Inherited Members

Constructors

SicBlockCipher(IBlockCipher)

public SicBlockCipher(IBlockCipher cipher)

Parameters

cipher IBlockCipher

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public virtual string AlgorithmName { get; }

Property Value

string

IsPartialBlockOkay

Indicates whether this cipher mode can handle partial blocks.

public virtual bool IsPartialBlockOkay { get; }

Property Value

bool

UnderlyingCipher

public IBlockCipher UnderlyingCipher { get; }

Property Value

IBlockCipher

Methods

GetBlockSize()

public virtual int GetBlockSize()

Returns

int

The block size for this cipher, in bytes.

Init(bool, ICipherParameters)

Initialise the cipher.

public virtual void Init(bool forEncryption, ICipherParameters parameters)

Parameters

forEncryption bool

Initialise for encryption if true, for decryption if false.

parameters ICipherParameters

The key or other data required by the cipher.

ProcessBlock(byte[], int, byte[], int)

Process a block.

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

Parameters

input byte[]
inOff int

The offset into that the input block begins.

output byte[]
outOff int

The offset into to write the output block.

Returns

int

The number of bytes processed and produced.

Exceptions

DataLengthException

If input block is wrong size, or outBuf too small.

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

Process a block.

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

Parameters

input ReadOnlySpan<byte>

The input block as a span.

output Span<byte>

The output span.

Returns

int

The number of bytes processed and produced.

Exceptions

DataLengthException

If input block is wrong size, or output span too small.

Reset()

Reset the cipher mode to the same state as it was after the last init (if there was one).

public virtual void Reset()