pub struct EstablishedEcies { /* private fields */ }
Expand description
An established ECIES session.
This session can be used to encrypt and decrypt messages between the two sides of the channel.
Implementations§
Source§impl EstablishedEcies
impl EstablishedEcies
Sourcepub const fn public_key(&self) -> Curve25519PublicKey
pub const fn public_key(&self) -> Curve25519PublicKey
Get our Curve25519PublicKey
.
This public key needs to be sent to the other side so that it can complete the ECIES channel establishment.
Sourcepub const fn check_code(&self) -> &CheckCode
pub const fn check_code(&self) -> &CheckCode
Get the CheckCode
which uniquely identifies this
EstablishedEcies
session.
This check code can be used to check that both sides of the session are indeed using the same shared secret.
Sourcepub fn encrypt(&mut self, plaintext: &[u8]) -> Message
pub fn encrypt(&mut self, plaintext: &[u8]) -> Message
Encrypt the given plaintext using this EstablishedEcies
session.
Trait Implementations§
Source§impl Debug for EstablishedEcies
impl Debug for EstablishedEcies
Source§impl Drop for EstablishedEcies
impl Drop for EstablishedEcies
Auto Trait Implementations§
impl Freeze for EstablishedEcies
impl RefUnwindSafe for EstablishedEcies
impl Send for EstablishedEcies
impl Sync for EstablishedEcies
impl Unpin for EstablishedEcies
impl UnwindSafe for EstablishedEcies
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