bryant / argon2rs

The pure-Rust password hashing library running on Argon2.
MIT License
174 stars 19 forks source link

Hash doesn't add the fields & verification example #15

Closed Keats closed 7 years ago

Keats commented 8 years ago

I was working on a patch to improve the readme a bit and I noticed a couple of things:

The verifier expects the fields to be there afaik, is the absence expected? Also, would you be open to a PR that adds a basic API for hashing/verifying like https://github.com/Keats/rust-bcrypt? Normal users would be able to only import {hash_password, verify_password} (which would use argon2i_simple internally) without caring about the implementation. If you want to change the passes etc you could still do it yourself

bryant commented 7 years ago

argon2i_simple computes the raw bytes of hash. nothing outside of src/verifier.rs has anything to do with encoded generation/verification.

as for documentation and examples, i'm always open to pull requests.

bryant commented 7 years ago

as for the suggested api calls that abstract away the choice of hash algorithm, they're probably more appropriate in a middle man library, since this one deals strictly with argon2.

bryant commented 7 years ago

Example and docs added in https://github.com/bryant/argon2rs/commit/5f81adc6810ce2e0d73109f012f7bc7518dca149 and https://github.com/bryant/argon2rs/commit/cab6665ebec9a73e7300eed411798778d0a323b5 .

Keats commented 7 years ago

Thanks for that! I can probably close the issue now