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>
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 for SymKeyEncryptedSessionKey
impl PartialEq 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 ==
.source§impl TryFrom<Esk> for SymKeyEncryptedSessionKey
impl TryFrom<Esk> for SymKeyEncryptedSessionKey
source§impl TryFrom<Packet> for SymKeyEncryptedSessionKey
impl TryFrom<Packet> for SymKeyEncryptedSessionKey
impl Eq for SymKeyEncryptedSessionKey
impl StructuralPartialEq for SymKeyEncryptedSessionKey
Auto Trait Implementations§
impl RefUnwindSafe for SymKeyEncryptedSessionKey
impl Send for SymKeyEncryptedSessionKey
impl Sync for SymKeyEncryptedSessionKey
impl Unpin for SymKeyEncryptedSessionKey
impl UnwindSafe for SymKeyEncryptedSessionKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more