Struct sequoia_ipc::Keygrip
source · pub struct Keygrip(_);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");