pub struct Builder<K, PG, NG, T, N, P, S, SS>where
K: KeyType + KeyGenerator<T, P, S> + KeyAgreement<T, P, S, SS>,
PG: Prologue,
NG: NonceGenerator<T, N>,
T: Tag,
N: TaggedData<T>,
P: TaggedData<T>,
S: TaggedData<T>,
SS: TaggedData<T>,{ /* private fields */ }Expand description
Generates a HandshakeState and also validates that all of the
prerequisites for the given parameters are satisfied.
Implementations§
Source§impl<K, PG, NG, T, N, P, S, SS> Builder<K, PG, NG, T, N, P, S, SS>where
K: KeyType + KeyGenerator<T, P, S> + KeyAgreement<T, P, S, SS>,
PG: Prologue,
NG: NonceGenerator<T, N>,
T: Tag,
N: TaggedData<T>,
P: TaggedData<T>,
S: TaggedData<T>,
SS: TaggedData<T>,
impl<K, PG, NG, T, N, P, S, SS> Builder<K, PG, NG, T, N, P, S, SS>where
K: KeyType + KeyGenerator<T, P, S> + KeyAgreement<T, P, S, SS>,
PG: Prologue,
NG: NonceGenerator<T, N>,
T: Tag,
N: TaggedData<T>,
P: TaggedData<T>,
S: TaggedData<T>,
SS: TaggedData<T>,
Sourcepub fn new(params: &Params<K, T, P, S, SS>, nonce_generator: &NG) -> Self
pub fn new(params: &Params<K, T, P, S, SS>, nonce_generator: &NG) -> Self
Construct a new builder from DiscoParams
Sourcepub fn with_prologue(self, data: &PG) -> Self
pub fn with_prologue(self, data: &PG) -> Self
Add prologue byte sequence that both parties want to confirm is identical
Sourcepub fn local_static_secret_key(self, key: &S) -> Self
pub fn local_static_secret_key(self, key: &S) -> Self
Add a local static secret key
Sourcepub fn local_static_public_key(self, key: &P) -> Self
pub fn local_static_public_key(self, key: &P) -> Self
Add a local static public key
Sourcepub fn local_ephemeral_secret_key(self, key: &S) -> Self
pub fn local_ephemeral_secret_key(self, key: &S) -> Self
Add a local ephemeral secret key
Sourcepub fn local_ephemeral_public_key(self, key: &P) -> Self
pub fn local_ephemeral_public_key(self, key: &P) -> Self
Add a local ephemeral public key
Sourcepub fn remote_static_public_key(self, key: &P) -> Self
pub fn remote_static_public_key(self, key: &P) -> Self
Add a remote static public key
Add a pre-shared key
Sourcepub fn msg_order(self, order: &TransportOrder) -> Self
pub fn msg_order(self, order: &TransportOrder) -> Self
Create strobe states that can handle out-of-order messages
Sourcepub fn build_initiator(
self,
) -> Result<Session<K, PG, NG, T, N, P, S, SS>, Error>
pub fn build_initiator( self, ) -> Result<Session<K, PG, NG, T, N, P, S, SS>, Error>
Build an initiator disco session
Sourcepub fn build_responder(
self,
) -> Result<Session<K, PG, NG, T, N, P, S, SS>, Error>
pub fn build_responder( self, ) -> Result<Session<K, PG, NG, T, N, P, S, SS>, Error>
Build a responder disco session
Auto Trait Implementations§
impl<K, PG, NG, T, N, P, S, SS> Freeze for Builder<K, PG, NG, T, N, P, S, SS>
impl<K, PG, NG, T, N, P, S, SS> RefUnwindSafe for Builder<K, PG, NG, T, N, P, S, SS>where
PG: RefUnwindSafe,
NG: RefUnwindSafe,
S: RefUnwindSafe,
P: RefUnwindSafe,
SS: RefUnwindSafe,
K: RefUnwindSafe,
T: RefUnwindSafe,
N: RefUnwindSafe,
impl<K, PG, NG, T, N, P, S, SS> Send for Builder<K, PG, NG, T, N, P, S, SS>
impl<K, PG, NG, T, N, P, S, SS> Sync for Builder<K, PG, NG, T, N, P, S, SS>
impl<K, PG, NG, T, N, P, S, SS> Unpin for Builder<K, PG, NG, T, N, P, S, SS>
impl<K, PG, NG, T, N, P, S, SS> UnwindSafe for Builder<K, PG, NG, T, N, P, S, SS>where
PG: UnwindSafe,
NG: UnwindSafe,
S: UnwindSafe,
P: UnwindSafe,
SS: UnwindSafe,
K: UnwindSafe,
T: UnwindSafe,
N: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more