pub struct KeyPackage { /* private fields */ }
Expand description

The key package struct.

Implementations

Verify that this key package is valid:

  • verify that the signature on this key package is valid
  • verify that all mandatory extensions are present
  • make sure that the lifetime is valid Returns Ok(()) if all checks succeed and KeyPackageError otherwise

Get the external ID of this key package as byte slice. See ExternalKeyIdExtension for more details on the external key ID extension.

Returns a ExtensionError if no external key ID extension is present.

Get a reference to the extensions of this key package.

Check whether the this key package supports all the required extensions in the provided list.

Get a reference to the Credential.

Compute the KeyPackageRef of this KeyPackage. The KeyPackageRef is used to identify a member in a group (leaf in the tree) within MLS.

Get the Ciphersuite.

This impl block contains no items.

Private KeyPackage functions.

This impl block contains no items.

Crate visible KeyPackage functions.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This function deserializes the bytes from the provided a std::io::Read and returns the populated struct. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

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

This method tests for !=.

Serialize self and write it to the writer. The function returns the number of bytes written to writer. Read more

Serialize self and return it as a byte vector.

Serialize self and write it to the writer. The function returns the number of bytes written to writer. Read more

Serialize self and return it as a byte vector.

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Return the unsigned, serialized payload that should be verified.

A reference to the signature to be verified.

Verifies the payload against the given credential. The signature is fetched via the Verifiable::signature() function and the payload via Verifiable::unsigned_payload(). Read more

Verifies the payload against the given SignatureKey. The signature is fetched via the Verifiable::signature() function and the payload via Verifiable::unsigned_payload(). Read more

Verifies the payload against the given credential. The signature is fetched via the Verifiable::signature() function and the payload via Verifiable::unsigned_payload(). Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.