SHAKE256 class

SHAKE256 is an implementation of the SHAKE256 extendable-output function.

Example of usage:

final shake = SHAKE256();
shake.update(List<int>.from([0x01, 0x02, 0x03]));
final digest = shake.digest();
shake.clean();

The SHAKE256 class extends the SHAKE class and is configured to provide 256-bit variable-length output. It can be used to generate hash-like digests of varying lengths based on the input data. The update method is used to update the hash state with input data, and the digest method is used to obtain the final digest.

Inheritance

Constructors

SHAKE256()
Constructor for SHAKE-256

Properties

bitSize int
The desired output size in bits for the SHAKE digest.
finalinherited
blockSize int
block size
latefinalinherited
getBlockSize int
The block size used by the hash algorithm.
no setterinherited
getDigestLength int
The length of the digest produced by the hash algorithm.
no setterinherited
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() → dynamic
Clean up the internal state and reset hash object to its initial state.
inherited
cleanSavedState(dynamic savedState) → void
Clean up and reset the saved state of the hash object to its initial state. This function erases the buffer and sets the state and length to the default values. It is used to ensure that a previously saved hash state is cleared and ready for reuse.
inherited
digest([int outlen = 32]) List<int>
Generates the final hash digest by assembling and returning the hash state in a List
inherited
finish(List<int> out) Hash
Finalizes the hash computation and stores the hash state in the provided List
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() SHAKE
Resets the hash computation to its initial state.
inherited
restoreState(HashBytesState savedState) SHAKE
Restores the hash computation state from a previously saved state.
inherited
saveState() HashBytesState
Saves the current hash computation state into a serializable state object.
inherited
stream(List<int> dst) → void
The stream method is used for generating a stream of pseudorandom bytes from the SHAKE (Secure Hash Algorithm KEccak) hash function.
inherited
toString() String
A string representation of this object.
inherited
update(List<int> data) SHAKE
Updates the hash computation with the given data.
inherited

Operators

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