Enum tor_cert::CertifiedKey[][src]

#[non_exhaustive]
pub enum CertifiedKey {
    Ed25519(PublicKey),
    RsaSha256Digest([u8; 32]),
    X509Sha256Digest([u8; 32]),
    Unrecognized(UnrecognizedKey),
}
Expand description

One of the data types that can be certified by an Ed25519Cert.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Ed25519(PublicKey)

Tuple Fields

0: PublicKey

An Ed25519 public key, signed directly.

RsaSha256Digest([u8; 32])

Tuple Fields

The SHA256 digest of a DER-encoded RsaPublicKey

X509Sha256Digest([u8; 32])

Tuple Fields

The SHA256 digest of an X.509 certificate.

Unrecognized(UnrecognizedKey)

Tuple Fields

Some unrecognized key type.

Implementations

Return the byte that identifies the type of this key.

Return the bytes that are used for the body of this certified key or object.

If this is an Ed25519 public key, return Some(key). Otherwise, return None.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.