Warning, file /include/sodium/crypto_generichash_blake2b.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_blake2b_H
0002 #define crypto_generichash_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 #ifdef __IBMC__
0018 # pragma pack(1)
0019 #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
0020 # pragma pack(1)
0021 #else
0022 # pragma pack(push, 1)
0023 #endif
0024
0025 typedef struct CRYPTO_ALIGN(64) crypto_generichash_blake2b_state {
0026 unsigned char opaque[384];
0027 } crypto_generichash_blake2b_state;
0028
0029 #ifdef __IBMC__
0030 # pragma pack(pop)
0031 #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
0032 # pragma pack()
0033 #else
0034 # pragma pack(pop)
0035 #endif
0036
0037 #define crypto_generichash_blake2b_BYTES_MIN 16U
0038 SODIUM_EXPORT
0039 size_t crypto_generichash_blake2b_bytes_min(void);
0040
0041 #define crypto_generichash_blake2b_BYTES_MAX 64U
0042 SODIUM_EXPORT
0043 size_t crypto_generichash_blake2b_bytes_max(void);
0044
0045 #define crypto_generichash_blake2b_BYTES 32U
0046 SODIUM_EXPORT
0047 size_t crypto_generichash_blake2b_bytes(void);
0048
0049 #define crypto_generichash_blake2b_KEYBYTES_MIN 16U
0050 SODIUM_EXPORT
0051 size_t crypto_generichash_blake2b_keybytes_min(void);
0052
0053 #define crypto_generichash_blake2b_KEYBYTES_MAX 64U
0054 SODIUM_EXPORT
0055 size_t crypto_generichash_blake2b_keybytes_max(void);
0056
0057 #define crypto_generichash_blake2b_KEYBYTES 32U
0058 SODIUM_EXPORT
0059 size_t crypto_generichash_blake2b_keybytes(void);
0060
0061 #define crypto_generichash_blake2b_SALTBYTES 16U
0062 SODIUM_EXPORT
0063 size_t crypto_generichash_blake2b_saltbytes(void);
0064
0065 #define crypto_generichash_blake2b_PERSONALBYTES 16U
0066 SODIUM_EXPORT
0067 size_t crypto_generichash_blake2b_personalbytes(void);
0068
0069 SODIUM_EXPORT
0070 size_t crypto_generichash_blake2b_statebytes(void);
0071
0072 SODIUM_EXPORT
0073 int crypto_generichash_blake2b(unsigned char *out, size_t outlen,
0074 const unsigned char *in,
0075 unsigned long long inlen,
0076 const unsigned char *key, size_t keylen)
0077 __attribute__ ((nonnull(1)));
0078
0079 SODIUM_EXPORT
0080 int crypto_generichash_blake2b_salt_personal(unsigned char *out, size_t outlen,
0081 const unsigned char *in,
0082 unsigned long long inlen,
0083 const unsigned char *key,
0084 size_t keylen,
0085 const unsigned char *salt,
0086 const unsigned char *personal)
0087 __attribute__ ((nonnull(1)));
0088
0089 SODIUM_EXPORT
0090 int crypto_generichash_blake2b_init(crypto_generichash_blake2b_state *state,
0091 const unsigned char *key,
0092 const size_t keylen, const size_t outlen)
0093 __attribute__ ((nonnull(1)));
0094
0095 SODIUM_EXPORT
0096 int crypto_generichash_blake2b_init_salt_personal(crypto_generichash_blake2b_state *state,
0097 const unsigned char *key,
0098 const size_t keylen, const size_t outlen,
0099 const unsigned char *salt,
0100 const unsigned char *personal)
0101 __attribute__ ((nonnull(1)));
0102
0103 SODIUM_EXPORT
0104 int crypto_generichash_blake2b_update(crypto_generichash_blake2b_state *state,
0105 const unsigned char *in,
0106 unsigned long long inlen)
0107 __attribute__ ((nonnull(1)));
0108
0109 SODIUM_EXPORT
0110 int crypto_generichash_blake2b_final(crypto_generichash_blake2b_state *state,
0111 unsigned char *out,
0112 const size_t outlen) __attribute__ ((nonnull));
0113
0114 SODIUM_EXPORT
0115 void crypto_generichash_blake2b_keygen(unsigned char k[crypto_generichash_blake2b_KEYBYTES])
0116 __attribute__ ((nonnull));
0117
0118 #ifdef __cplusplus
0119 }
0120 #endif
0121
0122 #endif