Struct serde_encrypt::EncryptedMessage [−][src]
pub struct EncryptedMessage { /* fields omitted */ }Expand description
Encrypted message structure.
This struct is serialized into Vec<u8> (and deserialized from Vec<u8>).
In order to send an EncryptedMessage to a remote receiver, use let bin = encrypted_message.serialize();.
Then, the receiver should deserialize it by let encrypted_message = EncryptedMessage::deserialize(bin);.
This struct includes Nonce, which is internally used when a receiver decrypt the encrypted message.
Implementations
Serialize this encrypted message into binary in order to send it to a remote receiver.
pub fn deserialize(
serialized_encrypted_message: Vec<u8, Global>
) -> Result<EncryptedMessage, Error>[src]
pub fn deserialize(
serialized_encrypted_message: Vec<u8, Global>
) -> Result<EncryptedMessage, Error>[src]Deserializer function for a receiver.
Failures
- DeserializationError when:
- binary data does not have nonce.
Ref to XChaCha20 nonce (192-bit / 24-byte) used to create this encrypted message.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for EncryptedMessageimpl Send for EncryptedMessageimpl Sync for EncryptedMessageimpl Unpin for EncryptedMessageimpl UnwindSafe for EncryptedMessageBlanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V