Struct vodozemac::ecies::EstablishedEcies
source · 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