password-hashes icon indicating copy to clipboard operation
password-hashes copied to clipboard

Cannot parse sha256/sha512 Password-Hashes

Open C0D3-M4513R opened this issue 8 months ago • 6 comments

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/

C0D3-M4513R avatar Mar 06 '25 14:03 C0D3-M4513R