pub trait PlainMessageSharedKeyDeterministicCore {
    fn new(plain_message: Vec<u8>) -> Self
    where
        Self: Sized
; fn into_vec(self) -> Vec<u8>; fn as_slice(&self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]; fn encrypt<S>(&self, shared_key: &S) -> Result<EncryptedMessage, Error>
    where
        S: AsSharedKey
, { ... } fn decrypt<S>(
        encrypted_message: &EncryptedMessage,
        shared_key: &S
    ) -> Result<Self, Error>
    where
        Self: Sized,
        S: AsSharedKey
, { ... } fn generate_nonce() -> XNonce { ... } }
Expand description

Plain message structure serialized via serde.

Required Methods

Constructor

Raw representation

Ref to raw representation

Provided Methods

Encrypt into EncryptedMessage

Decrypt from EncryptedMessage

Generate fixed nonce to enable eq-match in cipher-text. Note that is more vulnerable than generating random nonce (which PlainMessageSharedKeyCore does).

Implementors