[−][src]Struct noise_protocol::HandshakeStateBuilder
Builder for HandshakeState
.
Methods
impl<'a, D> HandshakeStateBuilder<'a, D> where
D: DH,
[src]
D: DH,
pub fn new() -> Self
[src]
Create a new HandshakeStateBuilder
.
pub fn set_pattern(&mut self, p: HandshakePattern) -> &mut Self
[src]
Set handshake pattern.
pub fn set_is_initiator(&mut self, is: bool) -> &mut Self
[src]
Set whether the HandshakeState
is initiator.
pub fn set_prologue(&mut self, prologue: &'a [u8]) -> &mut Self
[src]
Set prologue.
pub fn set_e(&mut self, e: D::Key) -> &mut Self
[src]
Set ephemeral key.
This is not encouraged and usually not necessary. Cf.
HandshakeState::new()
.
pub fn set_s(&mut self, s: D::Key) -> &mut Self
[src]
Set static key.
pub fn set_re(&mut self, re: D::Pubkey) -> &mut Self
[src]
Set peer semi-ephemeral public key.
Usually used in fallback patterns.
pub fn set_rs(&mut self, rs: D::Pubkey) -> &mut Self
[src]
Set peer static public key.
pub fn build_handshake_state<C, H>(self) -> HandshakeState<D, C, H> where
C: Cipher,
H: Hash,
[src]
C: Cipher,
H: Hash,
Build HandshakeState
.
Panics
If any of set_pattern
,
set_prologue
or
set_is_initiator
has not
been called yet.
Trait Implementations
Auto Trait Implementations
impl<'a, D> RefUnwindSafe for HandshakeStateBuilder<'a, D> where
<D as DH>::Key: RefUnwindSafe,
<D as DH>::Pubkey: RefUnwindSafe,
<D as DH>::Key: RefUnwindSafe,
<D as DH>::Pubkey: RefUnwindSafe,
impl<'a, D> Send for HandshakeStateBuilder<'a, D> where
<D as DH>::Key: Send,
<D as DH>::Pubkey: Send,
<D as DH>::Key: Send,
<D as DH>::Pubkey: Send,
impl<'a, D> Sync for HandshakeStateBuilder<'a, D> where
<D as DH>::Key: Sync,
<D as DH>::Pubkey: Sync,
<D as DH>::Key: Sync,
<D as DH>::Pubkey: Sync,
impl<'a, D> Unpin for HandshakeStateBuilder<'a, D> where
<D as DH>::Key: Unpin,
<D as DH>::Pubkey: Unpin,
<D as DH>::Key: Unpin,
<D as DH>::Pubkey: Unpin,
impl<'a, D> UnwindSafe for HandshakeStateBuilder<'a, D> where
<D as DH>::Key: UnwindSafe,
<D as DH>::Pubkey: UnwindSafe,
<D as DH>::Key: UnwindSafe,
<D as DH>::Pubkey: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,