pub struct SecretKey { /* private fields */ }
Implementations§
source§impl SecretKey
impl SecretKey
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 PacketTrait for SecretKey
impl PacketTrait for SecretKey
source§impl PartialEq for SecretKey
impl PartialEq for SecretKey
source§impl PublicKeyTrait for SecretKey
impl PublicKeyTrait for SecretKey
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 SecretKey
impl SecretKeyTrait for SecretKey
impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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