Struct adnl::AdnlBuilder
source · pub struct AdnlBuilder { /* private fields */ }
Expand description
Builder of AdnlHandshake
structure, which then can be transformed into crate::AdnlClient
Implementations§
source§impl AdnlBuilder
impl AdnlBuilder
sourcepub fn with_static_aes_params(aes_params: AdnlAesParams) -> Self
pub fn with_static_aes_params(aes_params: AdnlAesParams) -> Self
Use specified session parameters. It is recommended to use random parameters.
sourcepub fn with_random_aes_params<R: CryptoRandom>(rng: &mut R) -> Self
pub fn with_random_aes_params<R: CryptoRandom>(rng: &mut R) -> Self
Use random session parameters (recommended).
sourcepub fn use_static_ecdh<P: AdnlPublicKey>(
self,
sender_public: P,
receiver_address: AdnlAddress,
ecdh_secret: AdnlSecret
) -> AdnlHandshake<P>
pub fn use_static_ecdh<P: AdnlPublicKey>( self, sender_public: P, receiver_address: AdnlAddress, ecdh_secret: AdnlSecret ) -> AdnlHandshake<P>
Specify sender, receiver, and secret on which they already agreed.
sourcepub fn perform_ecdh<S, P>(
self,
sender_private: S,
receiver_public: P
) -> AdnlHandshake<<S as AdnlPrivateKey>::PublicKey>where
S: AdnlPrivateKey,
P: AdnlPublicKey,
pub fn perform_ecdh<S, P>(
self,
sender_private: S,
receiver_public: P
) -> AdnlHandshake<<S as AdnlPrivateKey>::PublicKey>where
S: AdnlPrivateKey,
P: AdnlPublicKey,
Perform key agreement using sender private key and receiver public
Auto Trait Implementations§
impl RefUnwindSafe for AdnlBuilder
impl Send for AdnlBuilder
impl Sync for AdnlBuilder
impl Unpin for AdnlBuilder
impl UnwindSafe for AdnlBuilder
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