Trait Hasher
pub trait Hasher: Sync + Send {
// Required methods
fn digest(&self, input: &[u8]) -> Vec<u8> ⓘ;
fn alg_name(&self) -> &'static str;
// Provided method
fn encoded_digest(&self, disclosure: &str) -> String { ... }
}
Expand description
Used to implement hash functions to be used for encoding/decoding.
§Note
Implementations of this trait are expected only for algorithms listed in the IANA “Named Information Hash Algorithm” registry. See Hash Function Claim
Required Methods§
Provided Methods§
fn encoded_digest(&self, disclosure: &str) -> String
fn encoded_digest(&self, disclosure: &str) -> String
Returns the base64url-encoded digest of a disclosure
.