traits icon indicating copy to clipboard operation
traits copied to clipboard

Add HashWriter and HashReader structs

Open joebebel opened this issue 3 years ago • 1 comments

Not sure if this is the right place for this, but we've found frequently needing to read or write data while simultaneously hashing the data. Based on the implementation in the phase2 crate, gated by the "std" feature.

While creating this PR I noticed this previous PR which is somewhat related, but I think a little different, and I also note the documentation describes that hashers can implement io::Write, which I think is also slightly different.

joebebel avatar Nov 22 '22 09:11 joebebel

I've found myself in need for this as well, multiple times. However, I wonder whether some more generic construction like a Writer broadcasting to multiple other Writers (in a separate crate) would be a better solution here.

piegamesde avatar Dec 10 '22 12:12 piegamesde