4 ms·
In the bcrypt crate there is an explicit method for it: bcrypt::non_truncating_hash() https://docs.rs/bcrypt/latest/bcrypt/ https://docs.rs/bcrypt/latest
by kmarc 2y ago
In the bcrypt crate there is an explicit method for it:
bcrypt::non_truncating_hash()
https://docs.rs/bcrypt/latest/bcrypt/ https://docs.rs/bcrypt/latest/bcrypt/
Funnily, TFA later also suggests that such function should exist...
- ratorx 2y agoBeing pedantic, TFA suggests something slightly different. The non_truncating_hash should be the default (and called something that reflects it, eg. just hash), and a separate truncating_hash function may exist. The difference (from an API design perspective) is pretty massive.