hash_of_map function

Uint8List hash_of_map(
  1. Map map
)

@param {object} map @returns {Buffer}

Implementation

// ignore: non_constant_identifier_names
Uint8List hash_of_map(Map map) {
  var hashes = <Uint8List>[];

  for (var entry in map.entries) {
    hashes.add(hash_key_val(entry.key, entry.value));
  }

  return sha256Chunks(u8aSorted(hashes));
}