pub struct PublicSubkey { /* private fields */ }
Implementations§
Source§impl PublicSubkey
impl PublicSubkey
pub fn new(key: PublicSubkey, keyflags: KeyFlags) -> Self
pub fn sign<R, F>( self, rng: R, sec_key: &impl SecretKeyTrait, key_pw: F, ) -> Result<SignedPublicSubKey>
Trait Implementations§
Source§impl Clone for PublicSubkey
impl Clone for PublicSubkey
Source§fn clone(&self) -> PublicSubkey
fn clone(&self) -> PublicSubkey
Returns a duplicate 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 PublicSubkey
impl Debug for PublicSubkey
Source§impl PartialEq for PublicSubkey
impl PartialEq for PublicSubkey
Source§impl PublicKeyTrait for PublicSubkey
impl PublicKeyTrait for PublicSubkey
fn version(&self) -> KeyVersion
fn fingerprint(&self) -> Fingerprint
fn algorithm(&self) -> PublicKeyAlgorithm
Source§fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &SignatureBytes,
) -> Result<()>
fn verify_signature( &self, hash: HashAlgorithm, data: &[u8], sig: &SignatureBytes, ) -> Result<()>
Verify a signed message.
Data will be hashed using
hash
, before verifying.Source§fn encrypt<R: Rng + CryptoRng>(
&self,
rng: R,
plain: &[u8],
typ: EskType,
) -> Result<PkeskBytes>
fn encrypt<R: Rng + CryptoRng>( &self, rng: R, plain: &[u8], typ: EskType, ) -> Result<PkeskBytes>
Encrypt the given
plain
for this key.Source§fn serialize_for_hashing(&self, writer: &mut impl Write) -> Result<()>
fn serialize_for_hashing(&self, writer: &mut impl Write) -> Result<()>
This is the data used for hashing in a signature. Only uses the public portion of the key.
fn public_params(&self) -> &PublicParams
fn created_at(&self) -> &DateTime<Utc>
fn expiration(&self) -> Option<u16>
fn is_signing_key(&self) -> bool
fn is_encryption_key(&self) -> bool
impl Eq for PublicSubkey
impl StructuralPartialEq for PublicSubkey
Auto Trait Implementations§
impl Freeze for PublicSubkey
impl RefUnwindSafe for PublicSubkey
impl Send for PublicSubkey
impl Sync for PublicSubkey
impl Unpin for PublicSubkey
impl UnwindSafe for PublicSubkey
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