]> git.codecow.com Git - Monocypher.git/commit
crypto_chacha20 example overhaul
authorFabio Scotoni <34964387+fscoto@users.noreply.github.com>
Mon, 2 Mar 2020 06:57:22 +0000 (07:57 +0100)
committerFabio Scotoni <34964387+fscoto@users.noreply.github.com>
Mon, 2 Mar 2020 07:32:28 +0000 (08:32 +0100)
commitc4c036f473ef722285b59b9ae63aa65dbaa262e2
tree9d0502d5d16fd5f927695cfbd88b82291a82f83b
parent3582ffb5d34ef1afaafe3d70831561ceaae2ac7b
crypto_chacha20 example overhaul

1. Randomize keys and nonces.
2. Minor alignment fix in second example.
3. Make i unsigned to avoid clang warning about 500-(i-64) changing
   signedness with -Weverything.
4. Initialize ctr to 0.
5. Fix obviously wrong encryption by jumping around example
   (repeating ctr issue [!], wrong function used in the example).
doc/man/man3/crypto_chacha20.3monocypher