pub trait HttpDigest:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &str;
fn http_digest(&self, bytes_to_digest: &[u8]) -> String;
}
Expand description
Implementations of this trait correspond to digest algorithms listed here: https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
Must return the name exactly as specified in the above list of HTTP digest algorithms.
Sourcefn http_digest(&self, bytes_to_digest: &[u8]) -> String
fn http_digest(&self, bytes_to_digest: &[u8]) -> String
Returns the encoded digest, ready for inclusion in the HTTP Digest header. The encoding to use is specified in the above list of HTTP digest algorithms.