password-hashes
password-hashes copied to clipboard
Cannot parse sha256/sha512 Password-Hashes
I cannot parse sha256_crypt or sha512_crypt Password-Hashes with this library, because none of the encodings fit.
I tested with the password password hashed by https://www.dcode.fr/crypt-hashing-function to sha512 at 5000 rounds: $6$$bLTg4cpho8PIUrjfsE7qlU08Qx2UEfw..xOc6I1wpGVtyVYToGrr7BzRdAAnEr5lYFr1Z9WcCf1xNZ1HG9qFW1.
The crate you use for decoding the output hash seems to have a Decoder/Encoder ready for that use-case: Base64ShaCrypt
Edit: I also just realised, that this probably belongs to https://github.com/RustCrypto/traits/