Struct tuf::crypto::KeyId [] [src]

pub struct KeyId(_);

Wrapper type for public key's ID.

Calculating

In order to future proof the calculation of key IDs and preserver them across encoding types, a key's ID is calculated as the Sha-256 hash of the DER bytes of a key in Subject Public Key Info (SPKI) format.

SEQUENCE {
  SEQUENCE {
    OBJECT IDENTIFIER
    NULL
  }
  BIT STTRING
}

Where BIT STRING encapsulates the actual public key. In the case of RSA this is:

SEQUENCE {
  INTEGER (n, modulus)
  INTEGER (e, exponent)
}

Methods

impl KeyId
[src]

Parse a key ID from a base64url string.

Trait Implementations

impl Clone for KeyId
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for KeyId
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for KeyId
[src]

impl Hash for KeyId
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialOrd for KeyId
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for KeyId
[src]

This method returns an Ordering between self and other. Read more

impl Debug for KeyId
[src]

Formats the value using the given formatter.

impl Serialize for KeyId
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de> Deserialize<'de> for KeyId
[src]

Deserialize this value from the given Serde deserializer. Read more