CTR class

Counter (CTR) mode: turns a block cipher into a stream cipher by encrypting successive counter values and XORing them with the data.

Constructors

CTR(BuBlockCipher cipher, List<int> iv)
Creates a CTR instance over cipher, starting the counter at iv (which must be cipher's block size).

Properties

blockSize → int?
Returns the block size of the block cipher, or null if not set.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clean() → CTR
Zeroes the counter and keystream buffer, and drops the cipher.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process(List<int> src, [List<int>? dst]) → BuBytes
XORs src with the keystream (encrypt and decrypt are the same operation in CTR mode), writing src.length bytes into dst if given (dst must hold at least src.length bytes — GCM and Fortuna pass a longer buffer and fill the tail themselves).
toString() → String
A string representation of this object.
inherited

Operators

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