KeypackageExt

Trait KeypackageExt 

Source
pub trait KeypackageExt {
    // Required methods
    fn make_ref(&self) -> Result<KeypackageRef, MlsError>;
    fn ciphersuite(&self) -> Ciphersuite;
    fn credential_type(&self) -> CredentialType;
    fn is_valid(&self) -> bool;
}
Expand description

Extensions on the KeyPackage type for nicer usage patterns.

Required Methods§

Source

fn make_ref(&self) -> Result<KeypackageRef, MlsError>

Make a “fat” KeypackageRef from this Keypackage.

This is a fairly inexpensive operation.

Source

fn ciphersuite(&self) -> Ciphersuite

Returns the ciphersuite associated this this key package.

Source

fn credential_type(&self) -> CredentialType

Returns the credential type associated with this key package.

Source

fn is_valid(&self) -> bool

Determines whether a keypackage is valid in the sense of the former client_valid_keypackages_count method.

In practice, this just checks whether its lifetime (if present) has expired or not.

Implementors§