File: crypton_blake2s.c

package info (click to toggle)
haskell-crypton 0.34-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,380 kB
  • sloc: ansic: 22,092; haskell: 18,717; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "crypton_blake2s.h"

void crypton_blake2s_init(blake2s_ctx *ctx, uint32_t hashlen)
{
	_crypton_blake2s_init(ctx, hashlen / 8);
}

void crypton_blake2s_init_key(blake2s_ctx *ctx, uint32_t hashlen, const uint8_t *key, size_t keylen)
{
	_crypton_blake2s_init_key(ctx, hashlen / 8, (const void *) key, keylen);
}

void crypton_blake2s_update(blake2s_ctx *ctx, const uint8_t *data, uint32_t len)
{
	_crypton_blake2s_update(ctx, data, len);
}

void crypton_blake2s_finalize(blake2s_ctx *ctx, uint32_t hashlen, uint8_t *out)
{
	_crypton_blake2s_final(ctx, out, hashlen / 8);
}