sha256Chunks function

Uint8List sha256Chunks(
  1. List chunks
)

Implementation

Uint8List sha256Chunks(List<dynamic> chunks) {
  var ds = DigestSink();
  var sha = sha256.startChunkedConversion(ds);

  for (var chunk in chunks) {
    sha.add(chunk is ByteBuffer ? chunk.asInt8List() : chunk);
  }
  sha.close();
  return Uint8List.fromList(ds.value.bytes);
}