1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

Be positive

This commit is contained in:
Frank Denis 2019-03-21 09:27:55 +01:00
parent 773a94d70b
commit 6a83cd05ec

View File

@ -53,10 +53,10 @@ main(void)
sodium_bin2hex(hex, 192 * 2 + 1, output, 192);
printf("%s\n", hex);
for (i = -16; i < 0; i++) {
for (i = 16; i > 0; i--) {
memset(output, 0, 17 * 64);
crypto_stream_xsalsa20_xor_ic(output, output, 17 * 64, nonce,
(1ULL << 32) + (unsigned long long) i,
(1ULL << 32) - (unsigned long long) i,
firstkey);
sodium_bin2hex(hex, 2 * 17 * 64 + 1, output, 17 * 64);
printf("%s\n", hex);