We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fn example<D: Digest>() { let mut hasher = D::new(); hasher.input(b"hello world"); let hash = hasher.result(); println!("{:x}", hash); }
fn example<D: Digest>() where <D as sha2::Digest>::OutputSize: std::ops::Add, <<D as sha2::Digest>::OutputSize as std::ops::Add>::Output: sha2::digest::generic_array::ArrayLength<u8> { let mut hasher = D::new(); hasher.input(b"hello world"); let hash = hasher.result(); println!("{:x}", hash); }
The text was updated successfully, but these errors were encountered:
It sounds like you want Digest outputs to impl fmt::LowerHex?
Digest
fmt::LowerHex
Unfortunately right now they’re GenericArrays, so we can’t impl traits on them
GenericArray
Sorry, something went wrong.
Dup of #102
No branches or pull requests
The text was updated successfully, but these errors were encountered: