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>
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 for SecretSubkey
impl PartialEq 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<()>
fn unlock<F, G>(&self, pw: F, work: G) -> Result<()>
Unlock the raw data in the secret parameters.
type PublicKey = PublicSubkey
fn create_signature<F>( &self, key_pw: F, hash: HashAlgorithm, data: &[u8] ) -> Result<Vec<Mpi>>
fn public_key(&self) -> PublicSubkey
source§impl Serialize for SecretSubkey
impl Serialize for SecretSubkey
source§impl TryFrom<Packet> for SecretSubkey
impl TryFrom<Packet> for SecretSubkey
source§impl Zeroize for SecretSubkey
impl Zeroize for SecretSubkey
impl Eq for SecretSubkey
impl StructuralPartialEq for SecretSubkey
Auto Trait Implementations§
impl RefUnwindSafe for SecretSubkey
impl Send for SecretSubkey
impl Sync for SecretSubkey
impl Unpin for SecretSubkey
impl UnwindSafe for SecretSubkey
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