1 #ifndef crypto_shorthash_H 2 #define crypto_shorthash_H 3 4 #include <stddef.h> 5 6 #include "crypto_shorthash_siphash24.h" 7 #include "export.h" 8 9 #ifdef __cplusplus 10 # ifdef __GNUC__ 11 # pragma GCC diagnostic ignored "-Wlong-long" 12 # endif 13 extern "C" { 14 #endif 15 16 #define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES 17 SODIUM_EXPORT 18 size_t crypto_shorthash_bytes(void); 19 20 #define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES 21 SODIUM_EXPORT 22 size_t crypto_shorthash_keybytes(void); 23 24 #define crypto_shorthash_PRIMITIVE "siphash24" 25 SODIUM_EXPORT 26 const char *crypto_shorthash_primitive(void); 27 28 SODIUM_EXPORT 29 int crypto_shorthash(unsigned char *out, const unsigned char *in, 30 unsigned long long inlen, const unsigned char *k) 31 __attribute__ ((nonnull(1, 4))); 32 33 SODIUM_EXPORT 34 void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES]) 35 __attribute__ ((nonnull)); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif 42