File indexing completed on 2025-01-18 10:12:39
0001 #ifndef crypto_kdf_blake2b_H
0002 #define crypto_kdf_blake2b_H
0003
0004 #include <stddef.h>
0005 #include <stdint.h>
0006 #include <stdlib.h>
0007
0008 #include "export.h"
0009
0010 #ifdef __cplusplus
0011 # ifdef __GNUC__
0012 # pragma GCC diagnostic ignored "-Wlong-long"
0013 # endif
0014 extern "C" {
0015 #endif
0016
0017 #define crypto_kdf_blake2b_BYTES_MIN 16
0018 SODIUM_EXPORT
0019 size_t crypto_kdf_blake2b_bytes_min(void);
0020
0021 #define crypto_kdf_blake2b_BYTES_MAX 64
0022 SODIUM_EXPORT
0023 size_t crypto_kdf_blake2b_bytes_max(void);
0024
0025 #define crypto_kdf_blake2b_CONTEXTBYTES 8
0026 SODIUM_EXPORT
0027 size_t crypto_kdf_blake2b_contextbytes(void);
0028
0029 #define crypto_kdf_blake2b_KEYBYTES 32
0030 SODIUM_EXPORT
0031 size_t crypto_kdf_blake2b_keybytes(void);
0032
0033 SODIUM_EXPORT
0034 int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len,
0035 uint64_t subkey_id,
0036 const char ctx[crypto_kdf_blake2b_CONTEXTBYTES],
0037 const unsigned char key[crypto_kdf_blake2b_KEYBYTES])
0038 __attribute__ ((nonnull));
0039
0040 #ifdef __cplusplus
0041 }
0042 #endif
0043
0044 #endif