thash-blake2b.c - dedup - data deduplication program
HTML git clone git://bitreich.org/dedup/ git://hg6vgqziawt5s4dj.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
thash-blake2b.c (453B)
---
1 #include <sys/types.h>
2
3 #include <stdint.h>
4 #include <stdlib.h>
5 #include <string.h>
6
7 #include "blake2.h"
8 #include "dedup.h"
9
10 int
11 blake2bi(struct hash_ctx *ctx, size_t n)
12 {
13 return blake2b_init(&ctx->u.blake2b_ctx, n);
14 }
15
16 int
17 blake2bu(struct hash_ctx *ctx, const void *buf, size_t n)
18 {
19 return blake2b_update(&ctx->u.blake2b_ctx, buf, n);
20 }
21
22 int
23 blake2bf(struct hash_ctx *ctx, void *buf, size_t n)
24 {
25 return blake2b_final(&ctx->u.blake2b_ctx, buf, n);
26 }