diff --git a/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h b/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h index f86f0794..df992928 100644 --- a/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +++ b/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h @@ -45,4 +45,14 @@ int crypto_pwhash_scryptsalsa208sha256_str_verify(const char str[crypto_pwhash_s } #endif +/* Backward compatibility with version 0.5.0 */ + +#define crypto_pwhash_scryptxsalsa208sha256_SALTBYTES crypto_pwhash_scryptsalsa208sha256_SALTBYTES +#define crypto_pwhash_scryptxsalsa208sha256_saltbytes crypto_pwhash_scryptsalsa208sha256_saltbytes +#define crypto_pwhash_scryptxsalsa208sha256_STRBYTES crypto_pwhash_scryptsalsa208sha256_STRBYTES +#define crypto_pwhash_scryptxsalsa208sha256_strbytes crypto_pwhash_scryptsalsa208sha256_strbytes +#define crypto_pwhash_scryptxsalsa208sha256 crypto_pwhash_scryptsalsa208sha256 +#define crypto_pwhash_scryptxsalsa208sha256_str crypto_pwhash_scryptsalsa208sha256_str +#define crypto_pwhash_scryptxsalsa208sha256_str_verify crypto_pwhash_scryptsalsa208sha256_str_verify + #endif diff --git a/src/libsodium/sodium/compat.c b/src/libsodium/sodium/compat.c index 7da177d5..ece2dbc6 100644 --- a/src/libsodium/sodium/compat.c +++ b/src/libsodium/sodium/compat.c @@ -19,18 +19,21 @@ extern "C" { #endif +#undef crypto_pwhash_scryptxsalsa208sha256_saltbytes SODIUM_EXPORT size_t crypto_pwhash_scryptxsalsa208sha256_saltbytes(void) { return crypto_pwhash_scryptsalsa208sha256_saltbytes(); } +#undef crypto_pwhash_scryptxsalsa208sha256_strbytes SODIUM_EXPORT size_t crypto_pwhash_scryptxsalsa208sha256_strbytes(void) { return crypto_pwhash_scryptsalsa208sha256_strbytes(); } +#undef crypto_pwhash_scryptxsalsa208sha256 SODIUM_EXPORT int crypto_pwhash_scryptxsalsa208sha256(unsigned char * const out, unsigned long long outlen, @@ -44,6 +47,7 @@ crypto_pwhash_scryptxsalsa208sha256(unsigned char * const out, salt, opslimit, memlimit); } +#undef crypto_pwhash_scryptxsalsa208sha256_str SODIUM_EXPORT int crypto_pwhash_scryptxsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208sha256_STRBYTES], const char * const passwd, @@ -55,6 +59,7 @@ crypto_pwhash_scryptxsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208sha opslimit, memlimit); } +#undef crypto_pwhash_scryptxsalsa208sha256_str_verify SODIUM_EXPORT int crypto_pwhash_scryptxsalsa208sha256_str_verify(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES], const char * const passwd,