sha256Chunks function

Uint8List sha256Chunks(
  1. List chunks
)

Implementation

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

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