oconnor663 / blake2_c.rs

a safe wrapper around the BLAKE2 C implementation (deprecated in favor of blake2b_simd and blake2s_simd)
MIT License
7 stars 0 forks source link

should Digest implement Hash? #9

Open oconnor663 opened 6 years ago

asomers commented 6 years ago

No, I don't think so. Digest is the output of a hash function, but the Hash trait is for the input to hash functions. Instead, I think blake2 should contain a struct that implements Hasher

oconnor663 commented 6 years ago

Now that I look it up, it seems like ArrayVec implements Hash itself, so at least callers can use the exposed bytes field if they need something to put in a HashMap.