From e6cb2c87dc119268a75ac6f41645b96400abdd7c Mon Sep 17 00:00:00 2001 From: aunsane Date: Wed, 20 Dec 2017 23:44:35 +0300 Subject: libtox moved to tox folder instead of libs --- .../crypto_pwhash_scryptsalsa208sha256/utils.h | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 protocols/Tox/libtox/src/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/utils.h (limited to 'protocols/Tox/libtox/src/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/utils.h') diff --git a/protocols/Tox/libtox/src/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/utils.h b/protocols/Tox/libtox/src/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/utils.h new file mode 100644 index 0000000000..fb2020c35d --- /dev/null +++ b/protocols/Tox/libtox/src/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/utils.h @@ -0,0 +1,40 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef VANILLA_NACL /* toxcore only uses this when libsodium is unavailable */ + +#ifndef __SODIUM_UTILS_H__ +#define __SODIUM_UTILS_H__ + +#include + +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__cplusplus) || !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L +# define _SODIUM_C99(X) +#else +# define _SODIUM_C99(X) X +#endif + +SODIUM_EXPORT +void sodium_memzero(void * const pnt, const size_t len); + +/* WARNING: sodium_memcmp() must be used to verify if two secret keys + * are equal, in constant time. + * It returns 0 if the keys are equal, and -1 if they differ. + * This function is not designed for lexicographical comparisons. + */ +SODIUM_EXPORT +int sodium_memcmp(const void * const b1_, const void * const b2_, size_t len); + +#ifdef __cplusplus +} +#endif + +#endif + +#endif -- cgit v1.2.3