1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-24 12:36:01 -07:00
This commit is contained in:
Frank Denis 2017-09-18 23:29:58 +02:00
parent 77f3b71354
commit 525c21ed10

View File

@ -184,6 +184,7 @@ tv_stream_xchacha20(void)
assert(crypto_stream_xchacha20_keybytes() == crypto_stream_xchacha20_KEYBYTES);
assert(crypto_stream_xchacha20_noncebytes() == crypto_stream_xchacha20_NONCEBYTES);
assert(crypto_stream_xchacha20_messagebytes_max() == crypto_stream_xchacha20_MESSAGEBYTES_MAX);
printf("tv_stream_xchacha20: ok\n");
}
@ -332,6 +333,11 @@ tv_box_xchacha20poly1305(void)
assert(crypto_box_curve25519xchacha20poly1305_open_easy
(m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len,
nonce, small_order_p, sk) == -1);
assert(crypto_box_curve25519xchacha20poly1305_open_easy
(m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES - 1,
nonce, pk, sk) == -1);
assert(crypto_box_curve25519xchacha20poly1305_open_easy
(m2, out, 0, nonce, pk, sk) == -1);
assert(crypto_box_curve25519xchacha20poly1305_open_easy
(m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len,
nonce, pk, sk) == 0);