Closed marinakr closed 5 years ago
I create hash with
hash = Argon2.Base.hash_password("1", "salt-01111111111", [t_cost: 1, argon2_type: 2])
I am trying to verify hash:
Argon2.Base.verify_nif(hash, "1", 2)
and it fails:
** (ArgumentError) argument error (argon2_elixir) Argon2.Base.verify_nif("$argon2id$v=19$m=131072,t=1,p=4$c2FsdC0wMTExMTExMTExMQ$i+GCPGDQxyS2zinYa9skuKUrVt2vvSDYMJgzodxww1Y", "1", 2)
Am I miss something?
Before running Argon2.Base.verify_nif, you need to convert the hash to list, by using :binary.bin_to_list - see the implementation of verify_pass for an example.
Argon2.Base.verify_nif
:binary.bin_to_list
verify_pass
I create hash with
I am trying to verify hash:
and it fails:
Am I miss something?