fn mix_hash<B: AsRef<[u8]>>(&mut self, data: B) -> OckamResult<()> {
        let h = &self.h.ok_or_else(|| Error::InvalidState.into())?;

        let mut input = h.to_vec();
        input.extend_from_slice(data.as_ref());
        let vault = self.vault.lock().unwrap();
        self.h = Some(vault.sha256(&input)?);
        Ok(())
    }
/// mix hash step in Noise protocol
mix hash step in Noise protocol
mix hash step in Noise protocol
fn mix_hash<B: AsRef<[u8]>>(&mut self, data: B) -> OckamResult<()> {
        let h = &self.h.ok_or_else(|| Error::InvalidState.into())?;
        let mut input = h.to_vec();
        input.extend_from_slice(data.as_ref());
        let vault = self.vault.lock().unwrap();
        self.h = Some(vault.sha256(&input)?);
        Ok(())
    }
fn mix_hash < B : AsRef < [ u8 ] > > ( & mut self , data : B ) -> OckamResult < ( ) > { let h = & self . h . ok_or_else ( | | Error :: InvalidState . into ( ) ) ? ; let mut input = h . to_vec ( ) ; input . extend_from_slice ( data . as_ref ( ) ) ; let vault = self . vault . lock ( ) . unwrap ( ) ; self . h = Some ( vault . sha256 ( & input ) ? ) ; Ok ( ( ) ) }
mix hash step in Noise protocol
mix hash step in Noise protocol
&mut self
data
B
&mut self
data
B