lukechampine / blake3

An AVX-512 accelerated implementation of the BLAKE3 cryptographic hash function
MIT License
356 stars 23 forks source link

Add a usage section in README #15

Closed httpjamesm closed 2 years ago

httpjamesm commented 2 years ago

This PR adds a simple usage section in the README to help developers get up and running quickly with Blake3.

lukechampine commented 2 years ago

I don't think a usage section is warranted; if you've used any of the stdlib hashing packages, you know how to use blake3. Any BLAKE3-specific functionality (like XOF and DeriveKey) is explained in the godoc.

Looking at your example code, though, I can tell that you were confused by the size parameter of New. It refers to the digest size, i.e. the size of the resulting hash, not the size of the input. I'll update the docstring to make this more clear.

btw, if you just want to hash a []byte, you can use the Sum256 or Sum512 functions.

httpjamesm commented 2 years ago

I see, that makes more sense.