]> git.codecow.com Git - Monocypher.git/commit
Update crypto_argon2.3monocypher - fixes errors and warnings that can lead to incorre...
authorSeth Archambault <seth@doercreator.com>
Thu, 19 Oct 2023 03:20:16 +0000 (23:20 -0400)
committerLoup Vaillant <github-is-valid@loup-vaillant.fr>
Thu, 19 Oct 2023 20:13:39 +0000 (22:13 +0200)
commit983e136bbd3ce6cfb2062324bc64366379827e0b
tree5c0204758961296e86778a62615876c1c491f208
parent9a2c0d4478f4e0a94b59b478bfc6e058a0f20adf
Update crypto_argon2.3monocypher - fixes errors and warnings that can lead to incorrect solution

Closes: #264
Fixes these issues, by allowing password array to autosize, and then making sure to drop the \0 character when determining the size of the string, and also reorders the crypto_argon2_inputs field designators to remove a warning.

```
main.cpp:83:24: error: initializer-string for char array is too long, array size is 14 but initializer has size 15 (including the null terminating character)
uint8_t password[14] = "Okay Password!";
                       ^~~~~~~~~~~~~~~~
main.cpp:87:5: warning: ISO C++ requires field designators to be specified in declaration order; field 'pass_size' will be initialized after field 'salt' [-Wreorder-init-list]
    .salt      = salt,                 /* Salt for the password */
    ^~~~~~~~~~~~~~~~~
```
doc/crypto_argon2.3monocypher