crypto_kdf_blake2b.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef crypto_kdf_blake2b_H
  2. #define crypto_kdf_blake2b_H
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #include "crypto_kdf_blake2b.h"
  6. #include "export.h"
  7. #ifdef __cplusplus
  8. # ifdef __GNUC__
  9. # pragma GCC diagnostic ignored "-Wlong-long"
  10. # endif
  11. extern "C" {
  12. #endif
  13. #define crypto_kdf_blake2b_BYTES_MIN 16
  14. SODIUM_EXPORT
  15. size_t crypto_kdf_blake2b_bytes_min(void);
  16. #define crypto_kdf_blake2b_BYTES_MAX 64
  17. SODIUM_EXPORT
  18. size_t crypto_kdf_blake2b_bytes_max(void);
  19. #define crypto_kdf_blake2b_CONTEXTBYTES 8
  20. SODIUM_EXPORT
  21. size_t crypto_kdf_blake2b_contextbytes(void);
  22. #define crypto_kdf_blake2b_KEYBYTES 32
  23. SODIUM_EXPORT
  24. size_t crypto_kdf_blake2b_keybytes(void);
  25. SODIUM_EXPORT
  26. int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len,
  27. uint64_t subkey_id,
  28. const char ctx[crypto_kdf_blake2b_CONTEXTBYTES],
  29. const unsigned char key[crypto_kdf_blake2b_KEYBYTES])
  30. __attribute__ ((nonnull));
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif