mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-06-04 20:48:53 -04:00
Pass the blake2s_ctx to blake2s() as arg
Instead of allocating the blake2s_ctx in the blake2s() function we pass it as a pointer as an argument to be able to better control where the variable is in memory.
This commit is contained in:
parent
e0d68f3dae
commit
6d08a82c05
2 changed files with 7 additions and 7 deletions
|
@ -32,7 +32,8 @@ void blake2s_final(blake2s_ctx *ctx, void *out);
|
|||
// All-in-one convenience function.
|
||||
int blake2s(void *out, size_t outlen, // return buffer for digest
|
||||
const void *key, size_t keylen, // optional secret key
|
||||
const void *in, size_t inlen); // data to be hashed
|
||||
const void *in, size_t inlen, // data to be hashed
|
||||
blake2s_ctx *ctx);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue