SHA512256 class

The SHA512256 class extends the SHA-512 hash function, specifically truncating its output to 256 bits (32 bytes). It inherits the implementation of the SHA-512 hash algorithm

Example usage:

final data = List<int>.from([0, 1, 2, 3, 4, 5]);
final sha512256Hash = SHA512256().update(data).digest();

This class allows you to compute a SHA-512/256 hash, which is a widely-used cryptographic hash function known for its security and is often used in various security and data integrity applications

Inheritance

Constructors

SHA512256()

Properties

getBlockSize int
The block size used by the hash algorithm.
no setteroverride
getDigestLength int
The length of the digest produced by the hash algorithm.
no setteroverride
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() → void
Clean up the internal state and reset hash object to its initial state.
inherited
cleanSavedState(SHA512State 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() List<int>
Generates the final hash digest by assembling and returning the hash state in a List
inherited
finish(List<int> out) SerializableHash<HashState>
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() SerializableHash<HashState>
Resets the hash computation to its initial state.
inherited
restoreState(SHA512State savedState) SerializableHash<HashState>
Restores the hash computation state from a previously saved state.
inherited
saveState() SHA512State
Saves the current hash computation state into a serializable state object.
inherited
toString() String
A string representation of this object.
inherited
update(List<int> data, {int? length}) SerializableHash<HashState>
Updates the hash computation with the given data.
inherited

Operators

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

Static Methods

hash(List<int> data) List<int>
Computes the SHA-512/256 hash of the provided data.
override

Constants

blockSize → const int
block size
digestLength → const int
digest length