why does rustls provide a Hash trait in the crypto module if it isn't required to implement for crypto providers and it also isn't implemented by the two default providers, ring and aws-lc-rs

#rustls #rustlang

i see, it's an implementation detail for Tls12CipherSuite and similar

I wish there was a more generic hash trait implemented by different crypto providers (maybe something like digest::Digest) but as it stands there's no single one that different cyrpto implementations agree on so you have rustls defining a Hash and rustcrypto defining a Digest and other crates defining their own since there isn't an agreed upon version anywhere

@asonix i forgot how i solved this in bitbottle and it turns out it was in the funniest possible way: i just wrapped all of them in one new class: https://code.lag.net/robey/bitbottle/src/branch/main/src/hashing.rs
bitbottle/src/hashing.rs at main

bitbottle - a modern archive file format (in rust)

Cinnamon Rangers