Warning, file /include/sodium/crypto_generichash.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_generichash_H
0002 #define crypto_generichash_H
0003
0004 #include <stddef.h>
0005
0006 #include "crypto_generichash_blake2b.h"
0007 #include "export.h"
0008
0009 #ifdef __cplusplus
0010 # ifdef __GNUC__
0011 # pragma GCC diagnostic ignored "-Wlong-long"
0012 # endif
0013 extern "C" {
0014 #endif
0015
0016 #define crypto_generichash_BYTES_MIN crypto_generichash_blake2b_BYTES_MIN
0017 SODIUM_EXPORT
0018 size_t crypto_generichash_bytes_min(void);
0019
0020 #define crypto_generichash_BYTES_MAX crypto_generichash_blake2b_BYTES_MAX
0021 SODIUM_EXPORT
0022 size_t crypto_generichash_bytes_max(void);
0023
0024 #define crypto_generichash_BYTES crypto_generichash_blake2b_BYTES
0025 SODIUM_EXPORT
0026 size_t crypto_generichash_bytes(void);
0027
0028 #define crypto_generichash_KEYBYTES_MIN crypto_generichash_blake2b_KEYBYTES_MIN
0029 SODIUM_EXPORT
0030 size_t crypto_generichash_keybytes_min(void);
0031
0032 #define crypto_generichash_KEYBYTES_MAX crypto_generichash_blake2b_KEYBYTES_MAX
0033 SODIUM_EXPORT
0034 size_t crypto_generichash_keybytes_max(void);
0035
0036 #define crypto_generichash_KEYBYTES crypto_generichash_blake2b_KEYBYTES
0037 SODIUM_EXPORT
0038 size_t crypto_generichash_keybytes(void);
0039
0040 #define crypto_generichash_PRIMITIVE "blake2b"
0041 SODIUM_EXPORT
0042 const char *crypto_generichash_primitive(void);
0043
0044
0045
0046
0047
0048 typedef crypto_generichash_blake2b_state crypto_generichash_state;
0049
0050 SODIUM_EXPORT
0051 size_t crypto_generichash_statebytes(void);
0052
0053 SODIUM_EXPORT
0054 int crypto_generichash(unsigned char *out, size_t outlen,
0055 const unsigned char *in, unsigned long long inlen,
0056 const unsigned char *key, size_t keylen)
0057 __attribute__ ((nonnull(1)));
0058
0059 SODIUM_EXPORT
0060 int crypto_generichash_init(crypto_generichash_state *state,
0061 const unsigned char *key,
0062 const size_t keylen, const size_t outlen)
0063 __attribute__ ((nonnull(1)));
0064
0065 SODIUM_EXPORT
0066 int crypto_generichash_update(crypto_generichash_state *state,
0067 const unsigned char *in,
0068 unsigned long long inlen)
0069 __attribute__ ((nonnull(1)));
0070
0071 SODIUM_EXPORT
0072 int crypto_generichash_final(crypto_generichash_state *state,
0073 unsigned char *out, const size_t outlen)
0074 __attribute__ ((nonnull));
0075
0076 SODIUM_EXPORT
0077 void crypto_generichash_keygen(unsigned char k[crypto_generichash_KEYBYTES])
0078 __attribute__ ((nonnull));
0079
0080 #ifdef __cplusplus
0081 }
0082 #endif
0083
0084 #endif