Holds a public key.
Provides a typed and structured way of storing multiple MPIs (and the occasional elliptic curve) in packets.
RSA public key.
Fields of RSA
NIST DSA public key.
Fields of DSA
ElGamal public key.
Fields of ElGamal
DJBs "Twisted" Edwards curve DSA public key.
Fields of EdDSA
NISTs Elliptic curve DSA public key.
Fields of ECDSA
Elliptic curve ElGamal public key.
Fields of ECDH
Unknown number of MPIs for an unknown algorithm.
Fields of Unknown
Returns the length of the public key in bits.
For finite field crypto this returns the size of the field we
operate in, for ECC it returns
Note: This information is useless and should not be used to gauge the security of a particular key. This function exists only because some legacy PGP application like HKP need it.
None for unknown keys and curves.
pub fn algo(&self) -> Option<PublicKeyAlgorithm>[src]
Returns, if known, the public-key algorithm for this public key.
Parses a set of OpenPGP MPIs representing a public key.
See Section 3.2 of RFC 4880 for details.
Exports a serialized version of the object to
o. Read more
impl MarshalInto for PublicKey[src]
fn serialized_len(&self) -> usize[src]
Serializes the packet to a vector.
Exports into the given buffer. Read more
fn export_to_vec(&self) -> Result<Vec<u8>>[src]
Exports to a vector. Read more
impl PartialOrd<PublicKey> for PublicKey[src]
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from
source. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where1.3.0[src]
Feeds a slice of this type into the given [
Hasher]. Read more
type Error = Infallible
The type returned in the event of a conversion error.