SHA512State class

The SHA512State class represents the state of a SHA-512 hash calculation.

This class is used to store the state of a SHA-512 hash, including the high and low parts of the hash state, the current buffer, the buffer's length, and the total number of bytes hashed.

Example usage:

final state = SHA512State(
  stateHi: Int32List(8),
  stateLo: Int32List(8),
  buffer:List<int>.filled(SHA512.blockSize),
  bufferLength: 0,
  bytesHashed: 0,
);

It's typically used to save the state of a hash calculation to allow for incremental hashing. This can be especially useful when hashing large data in smaller chunks or when saving the intermediate state for further updates.

Implemented types

Constructors

SHA512State({required List<int> stateHi, required List<int> stateLo, List<int>? buffer, required int bufferLength, required int bytesHashed})

Properties

buffer List<int>?
final
bufferLength int
getter/setter pair
bytesHashed int
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
stateHi List<int>
final
stateLo List<int>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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