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§
Sourcefn is_enc_data(&self) -> bool
fn is_enc_data(&self) -> bool
Returns true is the packet contains RSA data (i.e is crate::protocol::Packet::EncryptionRequest).
Sourcefn as_enc_data(&self) -> Option<&[u8]>
fn as_enc_data(&self) -> Option<&[u8]>
Returns a refrence to the RSA encrypted data.
Sourcefn mut_enc_data(&mut self) -> Option<&mut Vec<u8>>
fn mut_enc_data(&mut self) -> Option<&mut Vec<u8>>
Returns a mutable refrence to the RSA encrypted data.