ChaCha20Algorithm class

Constructors

ChaCha20Algorithm(Uint32List key, int blockCounter, Uint32List nonce)
Expects a key with 8*32 bit, a 32-bit block-counter and a 3x32 bit nonce
ChaCha20Algorithm.fromState(Uint32List chaChaState)

Properties

chaChaState Uint32List
The current state of this ChaCha20 iteration.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

chaCha20() → void
Performs the ChaCha20 algorithm
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processBytes(Uint8List inputBytes) Uint8List
Returns a new Uint8List with transformed inputBytes. This can encrypt and decrypt, since they are the same for Chacha20.
quarterRound(int a, int b, int c, int d) → void
Performs a quarter round of ChaCha20 according to the documentation by RFC
rotateLeft(int n, int count) int
implementation of a left rotation of an integer by count places.
tenQuarterRounds() → void
ChaCha20 consists of ten of these quarter rounds
toString() String
A string representation of this object.
inherited
transformFourInputsByChaChaQuarterRound(Uint32List fourInputs) Uint32List
Takes a list of four inputs and performs a ChaCha quarter round on them

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

magicConstants List<int>
getter/setter pair