3 #include "crypto_auth_hmacsha512256.h"
4 #include "crypto_auth_hmacsha512.h"
5 #include "crypto_hash_sha512.h"
14 crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *state,
15 const unsigned char *key,
18 return crypto_auth_hmacsha512_init((crypto_auth_hmacsha512_state *) state,
23 crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *state,
24 const unsigned char *in,
25 unsigned long long inlen)
27 return crypto_auth_hmacsha512_update((crypto_auth_hmacsha512_state *) state,
32 crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *state,
35 unsigned char out0[64];
37 crypto_auth_hmacsha512_final((crypto_auth_hmacsha512_state *) state, out0);
38 memcpy(out, out0, 32);
44 crypto_auth(unsigned char *out, const unsigned char *in,
45 unsigned long long inlen, const unsigned char *k)
47 crypto_auth_hmacsha512256_state state;
49 crypto_auth_hmacsha512256_init(&state, k, crypto_auth_KEYBYTES);
50 crypto_auth_hmacsha512256_update(&state, in, inlen);
51 crypto_auth_hmacsha512256_final(&state, out);