fn hmac(&self, key: &[u8], input: &[u8]) -> Result<Vec<u8>> {
        let bytes = match self {
            ScramVersion::Sha1 => auth::mac::<Hmac<Sha1>>(key, input, "SCRAM")?
                .as_ref()
                .into(),
            ScramVersion::Sha256 => auth::mac::<Hmac<Sha256>>(key, input, "SCRAM")?
                .as_ref()
                .into(),
        };

        Ok(bytes)
    }
/// HMAC function used as part of SCRAM authentication.
HMAC function used as part of SCRAM authentication.
HMAC function used as part of SCRAM authentication .
fn hmac(&self, key: &[u8], input: &[u8]) -> Result<Vec<u8>> {
        let bytes = match self {
            ScramVersion::Sha1 => auth::mac::<Hmac<Sha1>>(key, input, "SCRAM")?
                .as_ref()
                .into(),
            ScramVersion::Sha256 => auth::mac::<Hmac<Sha256>>(key, input, "SCRAM")?
                .as_ref()
                .into(),
        };
        Ok(bytes)
    }
fn hmac ( & self , key : & [ u8 ] , input : & [ u8 ] ) -> Result < Vec < u8 > > { let bytes = match self { ScramVersion :: Sha1 => auth :: mac :: < Hmac < Sha1 > > ( key , input , " " ) ? . as_ref ( ) . into ( ) , ScramVersion :: Sha256 => auth :: mac :: < Hmac < Sha256 > > ( key , input , " " ) ? . as_ref ( ) . into ( ) , } ; Ok ( bytes ) }
HMAC function used as part of SCRAM authentication.
HMAC function used as part of SCRAM authentication .
&self
key
&[u8]
input
&[u8]
&self
key
&[u8]
input
&[u8]