/// Respond to a handshake directly
///
/// This is intended for use in cases where there is no shared session transcript.
/// It will error if this handshake was created using a session transcript.
Respond to a handshake directly
This is intended for use in cases where there is no shared session transcript.
It will error if this handshake was created using a session transcript.
Respond to a handshake directly This is intended for use in cases where there is no shared session transcript . It will error if this handshake was created using a session transcript .
pub fn respond<T>(
        self,
        rng: &mut T,
        password: &[u8],
        self_identity: &[u8],
    ) -> Result<(Duplex, Handshake), ()>
    where
        T: RngCore + CryptoRng,
    {
        let transcript = self.into_transcript();
        if transcript.is_none() {
            return Err(());
        }
        let (yodeler, handshake) = Yodeler::new(transcript, rng, password, self_identity);
        Ok((yodeler.complete(self)?, handshake))
    }
pub fn respond < T > ( self , rng : & mut T , password : & [ u8 ] , self_identity : & [ u8 ] , ) -> Result < ( Duplex , Handshake ) , ( ) > where T : RngCore + CryptoRng , { let transcript = self . into_transcript ( ) ; if transcript . is_none ( ) { return Err ( ( ) ) ; } let ( yodeler , handshake ) = Yodeler :: new ( transcript , rng , password , self_identity ) ; Ok ( ( yodeler . complete ( self ) ? , handshake ) ) }
Respond to a handshake directly
This is intended for use in cases where there is no shared session transcript.
Respond to a handshake directly This is intended for use in cases where there is no shared session transcript .
self
rng
&mut T
password
&[u8]
self_identity
&[u8]