]> git.codecow.com Git - Monocypher.git/commit
crypto_argon2i example overhaul
authorFabio Scotoni <34964387+fscoto@users.noreply.github.com>
Mon, 2 Mar 2020 06:34:14 +0000 (07:34 +0100)
committerFabio Scotoni <34964387+fscoto@users.noreply.github.com>
Mon, 2 Mar 2020 06:43:15 +0000 (07:43 +0100)
commit02b0a7f83c1d0fefbf962088e49d36b70c6e1e2a
tree9bf1446ea47b8fb326ae7b47338e470d35e8b522
parent675bea7cb9aa9faaaeb3f421f32a31ee1a11c169
crypto_argon2i example overhaul

1. The common type for a password is char*; use a cast instead.
   C11, para. 6.5(7) suggests this will be largely okay.
2. Wipe the password on failure.
3. Initialize the password size while there.
   Does not use strlen(3) to avoid extra stdlib functions.
4. Branch on allocation failure.
doc/man/man3/crypto_argon2i.3monocypher