More chacha20 tests
This commit is contained in:
parent
2f7d98a73d
commit
1217d30bae
@ -33,6 +33,19 @@ static void tv(void)
|
|||||||
sodium_bin2hex(out_hex, sizeof out_hex, out, sizeof out);
|
sodium_bin2hex(out_hex, sizeof out_hex, out, sizeof out);
|
||||||
printf("[%s]\n", out_hex);
|
printf("[%s]\n", out_hex);
|
||||||
} while (++i < (sizeof tests) / (sizeof tests[0]));
|
} while (++i < (sizeof tests) / (sizeof tests[0]));
|
||||||
|
|
||||||
|
memset(out, 0x42, sizeof out);
|
||||||
|
crypto_stream_chacha20_xor(out, out, sizeof out, nonce, key);
|
||||||
|
sodium_bin2hex(out_hex, sizeof out_hex, out, sizeof out);
|
||||||
|
printf("[%s]\n", out_hex);
|
||||||
|
|
||||||
|
crypto_stream_chacha20_xor_ic(out, out, sizeof out, nonce, 0U, key);
|
||||||
|
sodium_bin2hex(out_hex, sizeof out_hex, out, sizeof out);
|
||||||
|
printf("[%s]\n", out_hex);
|
||||||
|
|
||||||
|
crypto_stream_chacha20_xor_ic(out, out, sizeof out, nonce, 1U, key);
|
||||||
|
sodium_bin2hex(out_hex, sizeof out_hex, out, sizeof out);
|
||||||
|
printf("[%s]\n", out_hex);
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
|
@ -3,3 +3,6 @@
|
|||||||
[de9cba7bf3d69ef5e786dc63973f653a0b49e015adbff7134fcb7df137821031e85a050278a7084527214f73efc7fa5b5277062eb7a0433e445f41e3]
|
[de9cba7bf3d69ef5e786dc63973f653a0b49e015adbff7134fcb7df137821031e85a050278a7084527214f73efc7fa5b5277062eb7a0433e445f41e3]
|
||||||
[ef3fdfd6c61578fbf5cf35bd3dd33b8009631634d21e42ac33960bd138e50d32111e4caf237ee53ca8ad6426194a88545ddc497a0b466e7d6bbdb004]
|
[ef3fdfd6c61578fbf5cf35bd3dd33b8009631634d21e42ac33960bd138e50d32111e4caf237ee53ca8ad6426194a88545ddc497a0b466e7d6bbdb004]
|
||||||
[f798a189f195e66982105ffb640bb7757f579da31602fc93ec01ac56f85ac3c134a4547b733b46413042c9440049176905d3be59ea1c53f15916155c]
|
[f798a189f195e66982105ffb640bb7757f579da31602fc93ec01ac56f85ac3c134a4547b733b46413042c9440049176905d3be59ea1c53f15916155c]
|
||||||
|
[b5dae3cbb3d7a42bc0521db92649f5373d15dfe15440bed1ae43ee14ba18818376e616393179040372008b06420b552b4791fc1ba85e11b31b54571e]
|
||||||
|
[424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242]
|
||||||
|
[7a42c9d864fe77d65c6606553ec89c24cb9cd7640bc49b1acbb922aa046b8bffd818895e835afc147cfbf1e6e630ba6c4be5a53a0b69146cb5514cca]
|
||||||
|
Loading…
Reference in New Issue
Block a user