Class HC128Engine
- Namespace
- Org.BouncyCastle.Crypto.Engines
- Assembly
- BouncyCastle.Cryptography.dll
public class HC128Engine : IStreamCipher
- Inheritance
-
HC128Engine
- Implements
- Inherited Members
Properties
AlgorithmName
The name of the algorithm this cipher implements.
public virtual string AlgorithmName { get; }
Property Value
Methods
Init(bool, ICipherParameters)
public virtual void Init(bool forEncryption, ICipherParameters parameters)
Parameters
forEncryptionboolparametersICipherParameters
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
inputbyte[]The input byte array.
inOffintThe offset into
inputwhere the data to be processed starts.lenintoutputbyte[]The output buffer the processed bytes go into.
outOffintThe offset into
outputthe 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
inputReadOnlySpan<byte>The input span.
outputSpan<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
inputbytethe byte to be processed.
Returns
- byte
the result of processing the input byte.