Struct sequoia_ipc::Keygrip
source · pub struct Keygrip(/* private fields */);
Expand description
A proprietary, protocol agnostic identifier for public keys.
This is defined and used by GnuPG.
§Examples
use sequoia_ipc as ipc;
use ipc::Keygrip;
let k: Keygrip = "DD143ABA8D1D7D09875D6209E01BCF020788FF77".parse()?;
assert_eq!(&k.to_string(), "DD143ABA8D1D7D09875D6209E01BCF020788FF77");
Implementations§
source§impl Keygrip
impl Keygrip
sourcepub fn of(key: &PublicKey) -> Result<Keygrip>
pub fn of(key: &PublicKey) -> Result<Keygrip>
Computes the keygrip of the given public key.
§Examples
use sequoia_openpgp as openpgp;
use sequoia_ipc as ipc;
use ipc::Keygrip;
let cert: openpgp::Cert = // ...
assert_eq!(Keygrip::of(cert.primary_key().mpis())?.to_string(),
"DD143ABA8D1D7D09875D6209E01BCF020788FF77");
Trait Implementations§
source§impl PartialEq for Keygrip
impl PartialEq for Keygrip
impl Eq for Keygrip
impl StructuralPartialEq for Keygrip
Auto Trait Implementations§
impl Freeze for Keygrip
impl RefUnwindSafe for Keygrip
impl Send for Keygrip
impl Sync for Keygrip
impl Unpin for Keygrip
impl UnwindSafe for Keygrip
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