Class ChaChaEngine
- Namespace
- Org.BouncyCastle.Crypto.Engines
- Assembly
- BouncyCastle.Cryptography.dll
Implementation of Daniel J. Bernstein's ChaCha stream cipher.
public class ChaChaEngine : Salsa20Engine, IStreamCipher
- Inheritance
-
ChaChaEngine
- Implements
- Inherited Members
Constructors
ChaChaEngine()
Creates a 20 rounds ChaCha engine.
public ChaChaEngine()
ChaChaEngine(int)
Creates a ChaCha engine with a specific number of rounds.
public ChaChaEngine(int rounds)
Parameters
roundsintthe number of rounds (must be an even number).
Properties
AlgorithmName
The name of the algorithm this cipher implements.
public override string AlgorithmName { get; }
Property Value
Methods
AdvanceCounter()
protected override void AdvanceCounter()
GenerateKeyStream(byte[])
protected override void GenerateKeyStream(byte[] output)
Parameters
outputbyte[]
ResetCounter()
protected override void ResetCounter()
SetKey(byte[], byte[])
protected override void SetKey(byte[] keyBytes, byte[] ivBytes)