Closed sergey-brutsky closed 3 years ago
I think this might be a due to echo: at the shell 'echo' outputs a new line, so you're hashing the string "123\n". If I try doing the same with echo -n
to suppress the newline, it looks like I get the same hash:
$ echo -n '123' | argon2 12345678
Type: Argon2i
Iterations: 3
Memory: 4096 KiB
Parallelism: 1
Hash: d3764e984cd30be255d2239170f81aa00b993081514c811ac458caa3d7dcf8b6
Encoded: $argon2i$v=19$m=4096,t=3,p=1$MTIzNDU2Nzg$03ZOmEzTC+JV0iORcPgaoAuZMIFRTIEaxFjKo9fc+LY
0.020 seconds
Verification ok
$
Amazing, I didn't even think that problem could be in '\n'. Everything works as expected. @rangercej Thank you !
Hi, it looks like library has a bug or I'm using it wrong way.
Here is output from argon2 utility on debian linux
Here is my code
As I see output is different after the second dollar sign
Could you please explain me why ? Thanks
Details: