crypto_shorthash_siphash24.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef crypto_shorthash_siphash24_H
  2. #define crypto_shorthash_siphash24_H
  3. #include <stddef.h>
  4. #include "export.h"
  5. #ifdef __cplusplus
  6. # ifdef __GNUC__
  7. # pragma GCC diagnostic ignored "-Wlong-long"
  8. # endif
  9. extern "C" {
  10. #endif
  11. /* -- 64-bit output -- */
  12. #define crypto_shorthash_siphash24_BYTES 8U
  13. SODIUM_EXPORT
  14. size_t crypto_shorthash_siphash24_bytes(void);
  15. #define crypto_shorthash_siphash24_KEYBYTES 16U
  16. SODIUM_EXPORT
  17. size_t crypto_shorthash_siphash24_keybytes(void);
  18. SODIUM_EXPORT
  19. int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in,
  20. unsigned long long inlen, const unsigned char *k)
  21. __attribute__ ((nonnull(1, 4)));
  22. #ifndef SODIUM_LIBRARY_MINIMAL
  23. /* -- 128-bit output -- */
  24. #define crypto_shorthash_siphashx24_BYTES 16U
  25. SODIUM_EXPORT
  26. size_t crypto_shorthash_siphashx24_bytes(void);
  27. #define crypto_shorthash_siphashx24_KEYBYTES 16U
  28. SODIUM_EXPORT
  29. size_t crypto_shorthash_siphashx24_keybytes(void);
  30. SODIUM_EXPORT
  31. int crypto_shorthash_siphashx24(unsigned char *out, const unsigned char *in,
  32. unsigned long long inlen, const unsigned char *k)
  33. __attribute__ ((nonnull(1, 4)));
  34. #endif
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif