pub struct PublicSubkey { /* private fields */ }
Implementations
sourceimpl PublicSubkey
impl PublicSubkey
pub fn new(key: PublicSubkey, keyflags: KeyFlags) -> Self
pub fn sign<F>(
self,
sec_key: &impl SecretKeyTrait,
key_pw: F
) -> Result<SignedPublicSubKey> where
F: FnOnce() -> String + Clone,
Trait Implementations
sourceimpl Clone for PublicSubkey
impl Clone for PublicSubkey
sourcefn clone(&self) -> PublicSubkey
fn clone(&self) -> PublicSubkey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PublicSubkey
impl Debug for PublicSubkey
sourceimpl KeyTrait for PublicSubkey
impl KeyTrait for PublicSubkey
fn fingerprint(&self) -> Vec<u8>
fn algorithm(&self) -> PublicKeyAlgorithm
fn is_signing_key(&self) -> bool
fn is_encryption_key(&self) -> bool
sourceimpl PartialEq<PublicSubkey> for PublicSubkey
impl PartialEq<PublicSubkey> for PublicSubkey
sourcefn eq(&self, other: &PublicSubkey) -> bool
fn eq(&self, other: &PublicSubkey) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PublicSubkey) -> bool
fn ne(&self, other: &PublicSubkey) -> bool
This method tests for !=
.
sourceimpl PublicKeyTrait for PublicSubkey
impl PublicKeyTrait for PublicSubkey
sourcefn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
Verify a signed message.
Data will be hashed using hash
, before verifying. Read more
sourcefn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
Encrypt the given plain
for this key.
sourcefn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
This is the data used for hashing in a signature. Only uses the public portion of the key.
impl Eq for PublicSubkey
impl StructuralEq for PublicSubkey
impl StructuralPartialEq for PublicSubkey
Auto Trait Implementations
impl RefUnwindSafe for PublicSubkey
impl Send for PublicSubkey
impl Sync for PublicSubkey
impl Unpin for PublicSubkey
impl UnwindSafe for PublicSubkey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more