RustCrypto / traits

Collection of cryptography-related traits
592 stars 193 forks source link

password-hash: Add `Output::with_encoding` method #1657

Closed LunarLambda closed 2 months ago

LunarLambda commented 3 months ago

Allows Display/Debug printing Output with a specific Encoding without needing to go through encode/b64_encode, if e.g. it was created using init_with.

Maybe a version of init_with that allows specifying an encoding (similar to new_with_encoding) would be better, I'm not sure. This is a smaller, more general change.

tarcieri commented 2 months ago

Thanks! I'd agree an alternative constructor that allows directly setting the Encoding might make sense too.