consumeAs method
Consumes the entire stream
of string and generates a HashDigest.
Default encoding
scheme to get the input bytes is latin1.
Implementation
@pragma('vm:prefer-inline')
Future<HashDigest> consumeAs(
Stream<String> stream, [
Encoding encoding = latin1,
]) {
return bind(stream.transform(encoding.encoder)).first;
}