Istvan Soos
2016-09-07 10:18:25 UTC
Hi,
I find the crypto package a bit confusing wrt/ how to calculate sha1 hash
of a big file. Does the team have an example on how they suggest doing that?
Setting the result object on the startChunkedConversion() call is not
really intuitive, and as there seems to be a pending breaking change
anyway, I'd suggest a different route:
- Move sha1 and similar variables into functions that takes a List<int>
and return a hash. Similar to the current convert() method, they don't
store or manipulate internal state, they may not be on the class.
- Make the Sha1Hash class implement the Sink or even the
ByteConversionSink interface, and on closing, calculate the digest.
Best regards,
Istvan
I find the crypto package a bit confusing wrt/ how to calculate sha1 hash
of a big file. Does the team have an example on how they suggest doing that?
Setting the result object on the startChunkedConversion() call is not
really intuitive, and as there seems to be a pending breaking change
anyway, I'd suggest a different route:
- Move sha1 and similar variables into functions that takes a List<int>
and return a hash. Similar to the current convert() method, they don't
store or manipulate internal state, they may not be on the class.
- Make the Sha1Hash class implement the Sink or even the
ByteConversionSink interface, and on closing, calculate the digest.
Best regards,
Istvan
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.