Struct pgp::packet::SecretSubkey
source · pub struct SecretSubkey { /* private fields */ }
Implementations§
source§impl SecretSubkey
impl SecretSubkey
sourcepub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
pub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
Parses a SecretKey
packet from the given slice.
pub fn version(&self) -> KeyVersion
pub fn created_at(&self) -> &DateTime<Utc>
pub fn expiration(&self) -> Option<u16>
pub fn public_params(&self) -> &PublicParams
pub fn verify(&self) -> Result<()>
pub fn secret_params(&self) -> &SecretParams
sourcepub fn has_sha1_checksum(&self) -> bool
pub fn has_sha1_checksum(&self) -> bool
Checks if we should expect a SHA1 checksum in the encrypted part.
pub fn sign<F>(&self, key: &impl SecretKeyTrait, key_pw: F) -> Result<Signature>where F: FnOnce() -> String,
Trait Implementations§
source§impl Clone for SecretSubkey
impl Clone for SecretSubkey
source§fn clone(&self) -> SecretSubkey
fn clone(&self) -> SecretSubkey
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 SecretSubkey
impl Debug for SecretSubkey
source§impl Drop for SecretSubkey
impl Drop for SecretSubkey
source§impl From<SecretSubkey> for Packet
impl From<SecretSubkey> for Packet
source§fn from(other: SecretSubkey) -> Packet
fn from(other: SecretSubkey) -> Packet
Converts to this type from the input type.
source§impl KeyTrait for SecretSubkey
impl KeyTrait for SecretSubkey
source§impl PacketTrait for SecretSubkey
impl PacketTrait for SecretSubkey
source§impl PartialEq<SecretSubkey> for SecretSubkey
impl PartialEq<SecretSubkey> for SecretSubkey
source§fn eq(&self, other: &SecretSubkey) -> bool
fn eq(&self, other: &SecretSubkey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PublicKeyTrait for SecretSubkey
impl PublicKeyTrait for SecretSubkey
source§fn verify_signature(
&self,
hash: HashAlgorithm,
hashed: &[u8],
sig: &[Mpi]
) -> Result<()>
fn verify_signature( &self, hash: HashAlgorithm, hashed: &[u8], sig: &[Mpi] ) -> Result<()>
Verify a signed message.
Data will be hashed using
hash
, before verifying.source§impl SecretKeyTrait for SecretSubkey
impl SecretKeyTrait for SecretSubkey
source§fn unlock<F, G>(&self, pw: F, work: G) -> Result<()>where
F: FnOnce() -> String,
G: FnOnce(&SecretKeyRepr) -> Result<()>,
fn unlock<F, G>(&self, pw: F, work: G) -> Result<()>where F: FnOnce() -> String, G: FnOnce(&SecretKeyRepr) -> Result<()>,
Unlock the raw data in the secret parameters.