pub struct X<DH, H, RNG>where
H: Hash,{ /* private fields */ }
Expand description
One-Way Handshake Noise X
Implementations§
Source§impl<DH, H, RNG> X<DH, H, RNG>
impl<DH, H, RNG> X<DH, H, RNG>
Sourcepub fn send(
self,
s: &DH,
rs: &PublicKey,
payload: impl AsRef<[u8]>,
output: impl Write,
) -> Result<(), HandshakeStateError>
pub fn send( self, s: &DH, rs: &PublicKey, payload: impl AsRef<[u8]>, output: impl Write, ) -> Result<(), HandshakeStateError>
establish a one-way handshake with an already known PublicIdentity
and send the given payload too.
This is not the strongest way to establish a channel with another
peer. However it is strong enough encryption scheme as long as the
peer’s PrivateIdentity
is not compromised. This is why we are not
allowing a TransportState to be built with this function.
This is an asymmetric encryption scheme. Once the message has been sent, we won’t be able to decode it back.
Auto Trait Implementations§
impl<DH, H, RNG> Freeze for X<DH, H, RNG>
impl<DH, H, RNG> RefUnwindSafe for X<DH, H, RNG>
impl<DH, H, RNG> Send for X<DH, H, RNG>
impl<DH, H, RNG> Sync for X<DH, H, RNG>
impl<DH, H, RNG> Unpin for X<DH, H, RNG>
impl<DH, H, RNG> UnwindSafe for X<DH, H, RNG>
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