Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:39

0001 #ifndef crypto_auth_hmacsha512256_H
0002 #define crypto_auth_hmacsha512256_H
0003 
0004 #include <stddef.h>
0005 #include "crypto_auth_hmacsha512.h"
0006 #include "export.h"
0007 
0008 #ifdef __cplusplus
0009 # ifdef __GNUC__
0010 #  pragma GCC diagnostic ignored "-Wlong-long"
0011 # endif
0012 extern "C" {
0013 #endif
0014 
0015 #define crypto_auth_hmacsha512256_BYTES 32U
0016 SODIUM_EXPORT
0017 size_t crypto_auth_hmacsha512256_bytes(void);
0018 
0019 #define crypto_auth_hmacsha512256_KEYBYTES 32U
0020 SODIUM_EXPORT
0021 size_t crypto_auth_hmacsha512256_keybytes(void);
0022 
0023 SODIUM_EXPORT
0024 int crypto_auth_hmacsha512256(unsigned char *out,
0025                               const unsigned char *in,
0026                               unsigned long long inlen,
0027                               const unsigned char *k) __attribute__ ((nonnull(1, 4)));
0028 
0029 SODIUM_EXPORT
0030 int crypto_auth_hmacsha512256_verify(const unsigned char *h,
0031                                      const unsigned char *in,
0032                                      unsigned long long inlen,
0033                                      const unsigned char *k)
0034             __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
0035 
0036 /* ------------------------------------------------------------------------- */
0037 
0038 typedef crypto_auth_hmacsha512_state crypto_auth_hmacsha512256_state;
0039 
0040 SODIUM_EXPORT
0041 size_t crypto_auth_hmacsha512256_statebytes(void);
0042 
0043 SODIUM_EXPORT
0044 int crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *state,
0045                                    const unsigned char *key,
0046                                    size_t keylen) __attribute__ ((nonnull));
0047 
0048 SODIUM_EXPORT
0049 int crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *state,
0050                                      const unsigned char *in,
0051                                      unsigned long long inlen) __attribute__ ((nonnull(1)));
0052 
0053 SODIUM_EXPORT
0054 int crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *state,
0055                                     unsigned char *out) __attribute__ ((nonnull));
0056 
0057 SODIUM_EXPORT
0058 void crypto_auth_hmacsha512256_keygen(unsigned char k[crypto_auth_hmacsha512256_KEYBYTES])
0059             __attribute__ ((nonnull));
0060 
0061 #ifdef __cplusplus
0062 }
0063 #endif
0064 
0065 #endif