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

A KeyPackageBundle contains a KeyPackage, the corresponding private key, and a leaf secret.

Implementations

Create a new KeyPackageBundle with a fresh key pair. This key package will have the default MLS version. Use KeyPackageBundle::new_with_version to get a key package bundle for a specific MLS version.

Note that the capabilities extension gets added automatically, based on the configuration.

Returns a new KeyPackageBundle or a KeyPackageBundleNewError.

Create a new KeyPackageBundle with

  • a fresh key pair
  • the provided MLS version
  • the first cipher suite in the ciphersuites slice
  • the provided extensions

Note that the capabilities extension gets added automatically, based on the configuration.

Returns a new KeyPackageBundle or a KeyPackageBundleNewError.

Get a reference to the public part of this bundle, i.e. the KeyPackage.

Separates the bundle into the KeyPackage and the HPKE private key and leaf secret as raw byte vectors.

This impl block contains no items.

Crate visible KeyPackageBundle 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

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. 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.