Struct IK

Source
pub struct IK<DH, H, RNG, S>
where H: Hash,
{ /* private fields */ }
Expand description

Interactive Handshake Noise IK

Implementations§

Source§

impl<DH, H, RNG> IK<DH, H, RNG, A>
where DH: Dh, H: Hash,

Source

pub fn new(rng: RNG, prologue: &[u8]) -> Self

Source§

impl<DH, H, RNG> IK<DH, H, RNG, A>
where RNG: RngCore + CryptoRng, DH: Dh, H: Hash,

Source

pub fn initiate<K>( self, s: &K, rs: PublicKey, output: impl Write, ) -> Result<IK<DH, H, RNG, WaitB>, HandshakeStateError>
where K: Dh,

Source§

impl<DH, H, RNG> IK<DH, H, RNG, A>
where DH: Dh, H: Hash,

Source

pub fn receive( self, s: &DH, input: &[u8], ) -> Result<IK<DH, H, RNG, SendB>, HandshakeStateError>

Source§

impl<DH, H, RNG> IK<DH, H, RNG, SendB>
where RNG: RngCore + CryptoRng, DH: Dh, H: Hash,

Source§

impl<DH, H, RNG> IK<DH, H, RNG, WaitB>
where DH: Dh, H: Hash,

Source

pub fn remote_public_identity(&self) -> &PublicKey

Source

pub fn receive( self, s: &DH, input: &[u8], ) -> Result<TransportState<H>, HandshakeStateError>

Auto Trait Implementations§

§

impl<DH, H, RNG, S> Freeze for IK<DH, H, RNG, S>
where S: Freeze, RNG: Freeze, <H as Hash>::HASH: Freeze, H: Freeze, DH: Freeze,

§

impl<DH, H, RNG, S> RefUnwindSafe for IK<DH, H, RNG, S>

§

impl<DH, H, RNG, S> Send for IK<DH, H, RNG, S>
where S: Send, RNG: Send, <H as Hash>::HASH: Send, H: Send, DH: Send,

§

impl<DH, H, RNG, S> Sync for IK<DH, H, RNG, S>
where S: Sync, RNG: Sync, <H as Hash>::HASH: Sync, H: Sync, DH: Sync,

§

impl<DH, H, RNG, S> Unpin for IK<DH, H, RNG, S>
where S: Unpin, RNG: Unpin, <H as Hash>::HASH: Unpin, H: Unpin, DH: Unpin,

§

impl<DH, H, RNG, S> UnwindSafe for IK<DH, H, RNG, S>
where S: UnwindSafe, RNG: UnwindSafe, <H as Hash>::HASH: UnwindSafe, H: UnwindSafe, DH: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V