aboutsummaryrefslogtreecommitdiffstats
path: root/blake2s.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-01-16 13:42:15 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2022-01-24 16:59:37 +0100
commitadcaee95cce63db00e0d338b4cc4c8d13ef121c4 (patch)
tree41e115318bc5f2afdbd23388dfb2b6c6ce62f06e /blake2s.c
downloadkbench9000-jd/mix-pool-bytes-comparison.tar.xz
kbench9000-jd/mix-pool-bytes-comparison.zip
Initial scaffoldingjd/mix-pool-bytes-comparison
Diffstat (limited to 'blake2s.c')
-rw-r--r--blake2s.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/blake2s.c b/blake2s.c
new file mode 100644
index 0000000..6d5500a
--- /dev/null
+++ b/blake2s.c
@@ -0,0 +1,9 @@
+#include <linux/kernel.h>
+#include <crypto/blake2s.h>
+
+static struct blake2s_state hash = { .outlen = 32 /* TODO: other constants */ };
+
+void mix_blake2s(const void *in, int nbytes)
+{
+ blake2s_update(&hash, in, nbytes);
+}