HttpDigest

Trait HttpDigest 

Source
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§

Source

fn name(&self) -> &str

Must return the name exactly as specified in the above list of HTTP digest algorithms.

Source

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.

Implementations on Foreign Types§

Source§

impl HttpDigest for Sha256

Source§

fn name(&self) -> &str

Source§

fn http_digest(&self, bytes_to_digest: &[u8]) -> String

Source§

impl HttpDigest for Sha512

Source§

fn name(&self) -> &str

Source§

fn http_digest(&self, bytes_to_digest: &[u8]) -> String

Implementors§