forked from cory/tildefriends
Latest libsodium-1.0.19-stable.tar.gz
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4788 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2
deps/libsodium/test/constcheck.sh
vendored
2
deps/libsodium/test/constcheck.sh
vendored
@ -5,7 +5,7 @@ CT='ct.c'
|
||||
echo '#include <assert.h>' > "$CT"
|
||||
echo '#include <sodium.h>' >> "$CT"
|
||||
echo 'int main(void) {' >> "$CT"
|
||||
for macro in $(egrep -r '#define crypto_.*BYTES(_[A-Z]+)? ' src/libsodium/include | \
|
||||
for macro in $(grep -Er '#define crypto_.*BYTES(_[A-Z]+)? ' src/libsodium/include | \
|
||||
cut -d: -f2- | cut -d' ' -f2 | \
|
||||
fgrep -v edwards25519sha512batch | sort -u); do
|
||||
func=$(echo "$macro" | tr A-Z a-z)
|
||||
|
2
deps/libsodium/test/default/kdf_hkdf.c
vendored
2
deps/libsodium/test/default/kdf_hkdf.c
vendored
@ -81,10 +81,12 @@ tv_kdf_hkdf(void)
|
||||
assert(crypto_kdf_hkdf_sha512_bytes_min() == crypto_kdf_hkdf_sha512_BYTES_MIN);
|
||||
assert(crypto_kdf_hkdf_sha512_bytes_max() == crypto_kdf_hkdf_sha512_BYTES_MAX);
|
||||
assert(crypto_kdf_hkdf_sha512_keybytes() == crypto_kdf_hkdf_sha512_KEYBYTES);
|
||||
assert(crypto_kdf_hkdf_sha512_statebytes() >= sizeof (crypto_kdf_hkdf_sha512_state));
|
||||
|
||||
assert(crypto_kdf_hkdf_sha256_bytes_min() == crypto_kdf_hkdf_sha256_BYTES_MIN);
|
||||
assert(crypto_kdf_hkdf_sha256_bytes_max() == crypto_kdf_hkdf_sha256_BYTES_MAX);
|
||||
assert(crypto_kdf_hkdf_sha256_keybytes() == crypto_kdf_hkdf_sha256_KEYBYTES);
|
||||
assert(crypto_kdf_hkdf_sha256_statebytes() >= sizeof (crypto_kdf_hkdf_sha256_state));
|
||||
|
||||
assert(crypto_kdf_hkdf_sha256_KEYBYTES < crypto_kdf_hkdf_sha512_KEYBYTES);
|
||||
|
||||
|
@ -432,7 +432,7 @@ main(void)
|
||||
assert(crypto_pwhash_memlimit_moderate() > 0U);
|
||||
assert(crypto_pwhash_opslimit_sensitive() > 0U);
|
||||
assert(crypto_pwhash_memlimit_sensitive() > 0U);
|
||||
assert(strcmp(crypto_pwhash_primitive(), "argon2i") == 0);
|
||||
assert(strcmp(crypto_pwhash_primitive(), "argon2id,argon2i") == 0);
|
||||
|
||||
assert(crypto_pwhash_bytes_min() == crypto_pwhash_BYTES_MIN);
|
||||
assert(crypto_pwhash_bytes_max() == crypto_pwhash_BYTES_MAX);
|
||||
|
Reference in New Issue
Block a user