Struct pgp::packet::SymKeyEncryptedSessionKey
source · pub struct SymKeyEncryptedSessionKey { /* private fields */ }
Expand description
Symmetric-Key Encrypted Session Key Packet https://tools.ietf.org/html/rfc4880.html#section-5.3
Implementations§
source§impl SymKeyEncryptedSessionKey
impl SymKeyEncryptedSessionKey
sourcepub fn from_slice(version: Version, input: &[u8]) -> Result<Self>
pub fn from_slice(version: Version, input: &[u8]) -> Result<Self>
Parses a SymKeyEncryptedSessionKey
packet from the given slice.
pub fn sym_algorithm(&self) -> SymmetricKeyAlgorithm
pub fn s2k(&self) -> &StringToKey
pub fn encrypted_key(&self) -> &Option<Vec<u8>>
pub fn encrypt<F>( msg_pw: F, session_key: &[u8], s2k: StringToKey, alg: SymmetricKeyAlgorithm ) -> Result<Self>where F: FnOnce() -> String + Clone,
Trait Implementations§
source§impl Clone for SymKeyEncryptedSessionKey
impl Clone for SymKeyEncryptedSessionKey
source§fn clone(&self) -> SymKeyEncryptedSessionKey
fn clone(&self) -> SymKeyEncryptedSessionKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SymKeyEncryptedSessionKey
impl Debug for SymKeyEncryptedSessionKey
source§impl From<SymKeyEncryptedSessionKey> for Esk
impl From<SymKeyEncryptedSessionKey> for Esk
source§fn from(other: SymKeyEncryptedSessionKey) -> Esk
fn from(other: SymKeyEncryptedSessionKey) -> Esk
Converts to this type from the input type.
source§impl From<SymKeyEncryptedSessionKey> for Packet
impl From<SymKeyEncryptedSessionKey> for Packet
source§fn from(other: SymKeyEncryptedSessionKey) -> Packet
fn from(other: SymKeyEncryptedSessionKey) -> Packet
Converts to this type from the input type.
source§impl PartialEq<SymKeyEncryptedSessionKey> for SymKeyEncryptedSessionKey
impl PartialEq<SymKeyEncryptedSessionKey> for SymKeyEncryptedSessionKey
source§fn eq(&self, other: &SymKeyEncryptedSessionKey) -> bool
fn eq(&self, other: &SymKeyEncryptedSessionKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.