Holds a public key.
Provides a typed and structured way of storing multiple MPIs (and the occasional elliptic curve) in packets.
RSA public key.
NIST DSA public key.
Fields of DSA
ElGamal public key.
DJBs "Twisted" Edwards curve DSA public key.
NISTs Elliptic curve DSA public key.
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.
fn hash_slice<H>(data: &[Self], state: &mut H) where1.3.0[src]
impl MarshalInto for PublicKey[src]
fn serialized_len(&self) -> usize[src]
fn export_to_vec(&self) -> Result<Vec<u8>>[src]
impl PartialOrd<PublicKey> for PublicKey[src]
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>[src]
impl StructuralEq for PublicKey[src]
impl StructuralPartialEq for PublicKey[src]
impl RefUnwindSafe for PublicKey
impl UnwindSafe for PublicKey
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.