Table of Contents

Class VmpcEngine

Namespace
Org.BouncyCastle.Crypto.Engines
Assembly
BouncyCastle.Cryptography.dll
public class VmpcEngine : IStreamCipher
Inheritance
VmpcEngine
Implements
Derived
Inherited Members

Fields

P

protected byte[] P

Field Value

byte[]

n

protected byte n

Field Value

byte

s

protected byte s

Field Value

byte

workingIV

protected byte[] workingIV

Field Value

byte[]

workingKey

protected byte[] workingKey

Field Value

byte[]

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public virtual string AlgorithmName { get; }

Property Value

string

Methods

Init(bool, ICipherParameters)

public virtual void Init(bool forEncryption, ICipherParameters parameters)

Parameters

forEncryption bool
parameters ICipherParameters

InitKey(byte[], byte[])

protected virtual void InitKey(byte[] keyBytes, byte[] ivBytes)

Parameters

keyBytes byte[]
ivBytes byte[]

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

Process a block of bytes from input, putting the result into output.

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

Parameters

input byte[]

The input byte array.

inOff int

The offset into input where the data to be processed starts.

len int
output byte[]

The output buffer the processed bytes go into.

outOff int

The offset into output the processed data starts at.

Exceptions

DataLengthException

If the input buffer is too small.

OutputLengthException

If the output buffer is too small.

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

Process a block of bytes from input, putting the result into output.

public virtual void ProcessBytes(ReadOnlySpan<byte> input, Span<byte> output)

Parameters

input ReadOnlySpan<byte>

The input span.

output Span<byte>

The output span.

Exceptions

OutputLengthException

If the output span is too small.

Reset()

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

public virtual void Reset()

ReturnByte(byte)

encrypt/decrypt a single byte returning the result.

public virtual byte ReturnByte(byte input)

Parameters

input byte

the byte to be processed.

Returns

byte

the result of processing the input byte.