]> git.codecow.com Git - Monocypher.git/commitdiff
Fix example for crypto_argon2i
authorCuleX <cculex@gmail.com>
Sat, 9 Sep 2017 10:47:55 +0000 (12:47 +0200)
committerCuleX <cculex@gmail.com>
Sat, 9 Sep 2017 10:47:55 +0000 (12:47 +0200)
It actually did not have a password and password length parameter.

The invocation line was thus split up into logical blocks to avoid
confusing the reader.  A similar layout can be observed in
tests/self.c:argon2i().

man/3monocypher/crypto_argon2i.3monocypher

index a85c970b452b222189485a383b85aae7ba3faa72..88e7b787cb6150267f6bb4894afa3a9b77a2012e 100644 (file)
@@ -166,8 +166,12 @@ if (work_area == NULL) {
 
 /* ...randomly generate salt here... */
 
-crypto_argon2i(hash, sizeof(hash), work_area, nb_blocks, nb_iterations,
-    salt, sizeof(salt), NULL, 0, NULL, 0);
+crypto_argon2i(hash, sizeof(hash),
+    work_area, nb_blocks, nb_iterations,
+    password, strlen(password),
+    salt, sizeof(salt),
+    NULL, 0,
+    NULL, 0);
 .Ed
 .Sh SEE ALSO
 .Xr crypto_lock 3monocypher ,