sha512HashHalves static method
Computes the SHA512 hash of the input data and returns its halves.
This method computes the SHA512 hash of the provided data and returns the first half and the second half of the hash as a tuple.
data
The input data for which the hash is to be computed.
returns A tuple containing the first and second halves of the SHA512 hash.
Implementation
static Tuple<List<int>, List<int>> sha512HashHalves(List<int> data) {
final hash = SHA512.hash(data);
const halvesLength = sha512DeigestLength ~/ 2;
return Tuple(hash.sublist(0, halvesLength), hash.sublist(halvesLength));
}