Warning, file /include/sodium/crypto_kdf_hkdf_sha512.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef crypto_kdf_hkdf_sha512_H
0002 #define crypto_kdf_hkdf_sha512_H
0003
0004 #include <stddef.h>
0005 #include <stdint.h>
0006 #include <stdlib.h>
0007
0008 #include "crypto_kdf.h"
0009 #include "crypto_auth_hmacsha512.h"
0010 #include "export.h"
0011
0012 #ifdef __cplusplus
0013 # ifdef __GNUC__
0014 # pragma GCC diagnostic ignored "-Wlong-long"
0015 # endif
0016 extern "C" {
0017 #endif
0018
0019 #define crypto_kdf_hkdf_sha512_KEYBYTES crypto_auth_hmacsha512_BYTES
0020 SODIUM_EXPORT
0021 size_t crypto_kdf_hkdf_sha512_keybytes(void);
0022
0023 #define crypto_kdf_hkdf_sha512_BYTES_MIN 0U
0024 SODIUM_EXPORT
0025 size_t crypto_kdf_hkdf_sha512_bytes_min(void);
0026
0027 #define crypto_kdf_hkdf_sha512_BYTES_MAX (0xff * crypto_auth_hmacsha512_BYTES)
0028 SODIUM_EXPORT
0029 size_t crypto_kdf_hkdf_sha512_bytes_max(void);
0030
0031 SODIUM_EXPORT
0032 int crypto_kdf_hkdf_sha512_extract(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES],
0033 const unsigned char *salt, size_t salt_len,
0034 const unsigned char *ikm, size_t ikm_len)
0035 __attribute__ ((nonnull(1)));
0036
0037 SODIUM_EXPORT
0038 void crypto_kdf_hkdf_sha512_keygen(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
0039 __attribute__ ((nonnull));
0040
0041 SODIUM_EXPORT
0042 int crypto_kdf_hkdf_sha512_expand(unsigned char *out, size_t out_len,
0043 const char *ctx, size_t ctx_len,
0044 const unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
0045 __attribute__ ((nonnull(1)));
0046
0047
0048
0049 typedef struct crypto_kdf_hkdf_sha512_state {
0050 crypto_auth_hmacsha512_state st;
0051 } crypto_kdf_hkdf_sha512_state;
0052
0053 SODIUM_EXPORT
0054 size_t crypto_kdf_hkdf_sha512_statebytes(void);
0055
0056 SODIUM_EXPORT
0057 int crypto_kdf_hkdf_sha512_extract_init(crypto_kdf_hkdf_sha512_state *state,
0058 const unsigned char *salt, size_t salt_len)
0059 __attribute__ ((nonnull(1)));
0060
0061 SODIUM_EXPORT
0062 int crypto_kdf_hkdf_sha512_extract_update(crypto_kdf_hkdf_sha512_state *state,
0063 const unsigned char *ikm, size_t ikm_len)
0064 __attribute__ ((nonnull));
0065
0066 SODIUM_EXPORT
0067 int crypto_kdf_hkdf_sha512_extract_final(crypto_kdf_hkdf_sha512_state *state,
0068 unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
0069 __attribute__ ((nonnull));
0070
0071 #ifdef __cplusplus
0072 }
0073 #endif
0074
0075 #endif