Trait PacketEncryption

Source
pub trait PacketEncryption {
    // Required methods
    fn is_enc_data(&self) -> bool;
    fn as_enc_data(&self) -> Option<&[u8]>;
    fn mut_enc_data(&mut self) -> Option<&mut Vec<u8>>;
}
Expand description

Trait for manipulating encryption data.

Required Methods§

Source

fn is_enc_data(&self) -> bool

Returns true is the packet contains RSA data (i.e is crate::protocol::Packet::EncryptionRequest).

Source

fn as_enc_data(&self) -> Option<&[u8]>

Returns a refrence to the RSA encrypted data.

Source

fn mut_enc_data(&mut self) -> Option<&mut Vec<u8>>

Returns a mutable refrence to the RSA encrypted data.

Implementors§