Struct core_crypto::proteus::ProteusConversationSession
source · pub struct ProteusConversationSession { /* private fields */ }
Expand description
Proteus Session wrapper, that contains the identifier and the associated proteus Session
Implementations§
source§impl ProteusConversationSession
impl ProteusConversationSession
sourcepub fn encrypt(&mut self, plaintext: &[u8]) -> CryptoResult<Vec<u8>>
pub fn encrypt(&mut self, plaintext: &[u8]) -> CryptoResult<Vec<u8>>
Encrypts a message for this Proteus session
sourcepub async fn decrypt(
&mut self,
store: &mut Connection,
ciphertext: &[u8],
) -> CryptoResult<Vec<u8>>
pub async fn decrypt( &mut self, store: &mut Connection, ciphertext: &[u8], ) -> CryptoResult<Vec<u8>>
Decrypts a message for this Proteus session
sourcepub fn identifier(&self) -> &str
pub fn identifier(&self) -> &str
Returns the session identifier
sourcepub fn fingerprint_local(&self) -> String
pub fn fingerprint_local(&self) -> String
Returns the public key fingerprint of the local identity (= self identity)
sourcepub fn fingerprint_remote(&self) -> String
pub fn fingerprint_remote(&self) -> String
Returns the public key fingerprint of the remote identity (= client you’re communicating with)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProteusConversationSession
impl RefUnwindSafe for ProteusConversationSession
impl Send for ProteusConversationSession
impl Sync for ProteusConversationSession
impl Unpin for ProteusConversationSession
impl UnwindSafe for ProteusConversationSession
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read moresource§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more