Home | History | Annotate | Line # | Download | only in sodium
      1 #ifndef crypto_auth_hmacsha512256_H
      2 #define crypto_auth_hmacsha512256_H
      3 
      4 #include <stddef.h>
      5 #include "crypto_auth_hmacsha512.h"
      6 #include "export.h"
      7 
      8 #ifdef __cplusplus
      9 # ifdef __GNUC__
     10 #  pragma GCC diagnostic ignored "-Wlong-long"
     11 # endif
     12 extern "C" {
     13 #endif
     14 
     15 #define crypto_auth_hmacsha512256_BYTES 32U
     16 SODIUM_EXPORT
     17 size_t crypto_auth_hmacsha512256_bytes(void);
     18 
     19 #define crypto_auth_hmacsha512256_KEYBYTES 32U
     20 SODIUM_EXPORT
     21 size_t crypto_auth_hmacsha512256_keybytes(void);
     22 
     23 SODIUM_EXPORT
     24 int crypto_auth_hmacsha512256(unsigned char *out, const unsigned char *in,
     25                               unsigned long long inlen,const unsigned char *k);
     26 
     27 SODIUM_EXPORT
     28 int crypto_auth_hmacsha512256_verify(const unsigned char *h,
     29                                      const unsigned char *in,
     30                                      unsigned long long inlen,
     31                                      const unsigned char *k)
     32             __attribute__ ((warn_unused_result));
     33 
     34 /* ------------------------------------------------------------------------- */
     35 
     36 typedef crypto_auth_hmacsha512_state crypto_auth_hmacsha512256_state;
     37 
     38 SODIUM_EXPORT
     39 size_t crypto_auth_hmacsha512256_statebytes(void);
     40 
     41 SODIUM_EXPORT
     42 int crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *state,
     43                                    const unsigned char *key,
     44                                    size_t keylen);
     45 
     46 SODIUM_EXPORT
     47 int crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *state,
     48                                      const unsigned char *in,
     49                                      unsigned long long inlen);
     50 
     51 SODIUM_EXPORT
     52 int crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *state,
     53                                     unsigned char *out);
     54 
     55 SODIUM_EXPORT
     56 void crypto_auth_hmacsha512256_keygen(unsigned char k[crypto_auth_hmacsha512256_KEYBYTES]);
     57 
     58 #ifdef __cplusplus
     59 }
     60 #endif
     61 
     62 #endif
     63