traits
traits copied to clipboard
password-hash: add `Error::OutputSize`
See https://github.com/RustCrypto/password-hashes/pull/313.
Sometimes a very specific output size is expected. Any bike-shedding is very welcome.
This is back to having three different variants that effectively mean different flavors of the same thing.
What about this instead?
OutputSize { expected: Ordering, size: usize }
OutputSize { expected: Ordering, size: usize }
I wasn't sure how you mean that, I kinda turned it around, the usize
holds the expect
ed size and the Ordering
holds if the actual size
is too long, too short, or unequal (doesn't match properly I guess).
Also squashed the commits.
EDIT: I hope the documentation is sufficient and alright.
@tarcieri just saw the new update to 0.5.0-pre.0, are we ready to add this breaking change now?
Thanks!