1 #include "cryptonite_blake2b.h"
2 
cryptonite_blake2b_init(blake2b_ctx * ctx,uint32_t hashlen)3 void cryptonite_blake2b_init(blake2b_ctx *ctx, uint32_t hashlen)
4 {
5 	blake2b_init(ctx, hashlen / 8);
6 }
7 
cryptonite_blake2b_update(blake2b_ctx * ctx,const uint8_t * data,uint32_t len)8 void cryptonite_blake2b_update(blake2b_ctx *ctx, const uint8_t *data, uint32_t len)
9 {
10 	blake2b_update(ctx, data, len);
11 }
12 
cryptonite_blake2b_finalize(blake2b_ctx * ctx,uint32_t hashlen,uint8_t * out)13 void cryptonite_blake2b_finalize(blake2b_ctx *ctx, uint32_t hashlen, uint8_t *out)
14 {
15 	blake2b_final(ctx, out, hashlen / 8);
16 }
17