BLAKE2 / libb2

C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp
Creative Commons Zero v1.0 Universal
132 stars 47 forks source link

API docs? #5

Open capr opened 8 years ago

capr commented 8 years ago

Thanks.

BurningEnlightenment commented 8 years ago

The complete public API lives in blake2.h and is self-explanatory (scroll to the bottom). You may also want to take a look at RFC7693. Besides that there isn't any documentation I'm aware of.

capr commented 8 years ago

No problem, I figured it out from the python binding.

Here's a LuaJIT binding if you want to add it to the website: https://luapower.com/blake2

Enhex commented 6 years ago

There's nothing leading to blake2.h and the The API isn't self explanatory, for example: what's outlen in the *_init functions?

Simple usage example with comments would help a lot instead of relying on guesswork.

sneves commented 6 years ago

That's a good point. Most of what these values mean lives on the BLAKE2 paper instead of API code.

For the record, outlen in the _init funcions refers to the desired hash output length. This is to differentiate, say, BLAKE2s with a 128-bit output from BLAKE2s with a 256-bit output; they'll effectively be different hash functions.