1 #ifndef crypto_auth_hmacsha256_H
2 #define crypto_auth_hmacsha256_H
5 #include "crypto_hash_sha256.h"
10 # pragma GCC diagnostic ignored "-Wlong-long"
15 typedef struct crypto_auth_hmacsha256_state {
16 crypto_hash_sha256_state ictx;
17 crypto_hash_sha256_state octx;
18 } crypto_auth_hmacsha256_state;
20 #define crypto_auth_hmacsha256_BYTES 32U
22 size_t crypto_auth_hmacsha256_bytes(void);
24 #define crypto_auth_hmacsha256_KEYBYTES 32U
26 size_t crypto_auth_hmacsha256_keybytes(void);
29 int crypto_auth_hmacsha256(unsigned char *out,
30 const unsigned char *in,
31 unsigned long long inlen,
32 const unsigned char *k);
35 int crypto_auth_hmacsha256_verify(const unsigned char *h,
36 const unsigned char *in,
37 unsigned long long inlen,
38 const unsigned char *k);
41 int crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state,
42 const unsigned char *key,
46 int crypto_auth_hmacsha256_update(crypto_auth_hmacsha256_state *state,
47 const unsigned char *in,
48 unsigned long long inlen);
51 int crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *state,