Struct pgp::packet::PublicKeyEncryptedSessionKey
source · pub struct PublicKeyEncryptedSessionKey { /* private fields */ }
Expand description
Public Key Encrypted Session Key Packet https://tools.ietf.org/html/rfc4880.html#section-5.1
Implementations§
source§impl PublicKeyEncryptedSessionKey
impl PublicKeyEncryptedSessionKey
sourcepub fn from_slice(version: Version, input: &[u8]) -> Result<Self>
pub fn from_slice(version: Version, input: &[u8]) -> Result<Self>
Parses a PublicKeyEncryptedSessionKey
packet from the given slice.
sourcepub fn from_session_key<R: CryptoRng + Rng>(
rng: &mut R,
session_key: &[u8],
alg: SymmetricKeyAlgorithm,
pkey: &impl PublicKeyTrait
) -> Result<Self>
pub fn from_session_key<R: CryptoRng + Rng>( rng: &mut R, session_key: &[u8], alg: SymmetricKeyAlgorithm, pkey: &impl PublicKeyTrait ) -> Result<Self>
Encrypts the given session key to the passed in public key.
pub fn id(&self) -> &KeyId
pub fn mpis(&self) -> &[Mpi]
pub fn packet_version(&self) -> Version
Trait Implementations§
source§impl Clone for PublicKeyEncryptedSessionKey
impl Clone for PublicKeyEncryptedSessionKey
source§fn clone(&self) -> PublicKeyEncryptedSessionKey
fn clone(&self) -> PublicKeyEncryptedSessionKey
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 PublicKeyEncryptedSessionKey
impl Debug for PublicKeyEncryptedSessionKey
source§impl From<PublicKeyEncryptedSessionKey> for Esk
impl From<PublicKeyEncryptedSessionKey> for Esk
source§fn from(other: PublicKeyEncryptedSessionKey) -> Esk
fn from(other: PublicKeyEncryptedSessionKey) -> Esk
Converts to this type from the input type.
source§impl From<PublicKeyEncryptedSessionKey> for Packet
impl From<PublicKeyEncryptedSessionKey> for Packet
source§fn from(other: PublicKeyEncryptedSessionKey) -> Packet
fn from(other: PublicKeyEncryptedSessionKey) -> Packet
Converts to this type from the input type.
source§impl PartialEq<PublicKeyEncryptedSessionKey> for PublicKeyEncryptedSessionKey
impl PartialEq<PublicKeyEncryptedSessionKey> for PublicKeyEncryptedSessionKey
source§fn eq(&self, other: &PublicKeyEncryptedSessionKey) -> bool
fn eq(&self, other: &PublicKeyEncryptedSessionKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.