Struct openmls::key_packages::KeyPackage
source · pub struct KeyPackage { /* private fields */ }
Expand description
The key package struct.
Implementations§
source§impl KeyPackage
impl KeyPackage
sourcepub fn builder() -> KeyPackageBuilder
pub fn builder() -> KeyPackageBuilder
Create a key package builder.
This is provided for convenience. You can also use KeyPackageBuilder::new
.
sourcepub fn delete<KeyStore: OpenMlsKeyStore>(
&self,
backend: &impl OpenMlsCryptoProvider<KeyStoreProvider = KeyStore>
) -> Result<(), KeyStore::Error>
pub fn delete<KeyStore: OpenMlsKeyStore>( &self, backend: &impl OpenMlsCryptoProvider<KeyStoreProvider = KeyStore> ) -> Result<(), KeyStore::Error>
Delete this key package and its private key from the key store.
sourcepub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Get a reference to the extensions of this key package.
sourcepub fn check_extension_support(
&self,
required_extensions: &[ExtensionType]
) -> Result<(), KeyPackageExtensionSupportError>
pub fn check_extension_support( &self, required_extensions: &[ExtensionType] ) -> Result<(), KeyPackageExtensionSupportError>
Check whether the this key package supports all the required extensions in the provided list.
sourcepub fn hash_ref(
&self,
backend: &impl OpenMlsCrypto
) -> Result<KeyPackageRef, LibraryError>
pub fn hash_ref( &self, backend: &impl OpenMlsCrypto ) -> Result<KeyPackageRef, LibraryError>
Compute the KeyPackageRef
of this KeyPackage
.
The KeyPackageRef
is used to identify a new member that should get
added to a group.
sourcepub fn ciphersuite(&self) -> Ciphersuite
pub fn ciphersuite(&self) -> Ciphersuite
Get the Ciphersuite
.
sourcepub fn hpke_init_key(&self) -> &HpkePublicKey
pub fn hpke_init_key(&self) -> &HpkePublicKey
Get the public HPKE init key of this key package.
Trait Implementations§
source§impl Clone for KeyPackage
impl Clone for KeyPackage
source§fn clone(&self) -> KeyPackage
fn clone(&self) -> KeyPackage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for KeyPackage
impl Debug for KeyPackage
source§impl<'de> Deserialize<'de> for KeyPackage
impl<'de> Deserialize<'de> for KeyPackage
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<KeyPackage> for KeyPackageIn
impl From<KeyPackage> for KeyPackageIn
source§fn from(value: KeyPackage) -> Self
fn from(value: KeyPackage) -> Self
Converts to this type from the input type.
source§impl From<KeyPackage> for LeafNode
impl From<KeyPackage> for LeafNode
source§fn from(key_package: KeyPackage) -> Self
fn from(key_package: KeyPackage) -> Self
Converts to this type from the input type.
source§impl From<KeyPackage> for MlsMessageOut
impl From<KeyPackage> for MlsMessageOut
source§fn from(key_package: KeyPackage) -> Self
fn from(key_package: KeyPackage) -> Self
Converts to this type from the input type.
source§impl MlsEntity for KeyPackage
impl MlsEntity for KeyPackage
source§const ID: MlsEntityId = MlsEntityId::KeyPackage
const ID: MlsEntityId = MlsEntityId::KeyPackage
Identifier used to downcast the actual entity within an OpenMlsKeyStore method.
In case for example you need to select a SQL table depending on the entity type
source§impl PartialEq<KeyPackage> for KeyPackage
impl PartialEq<KeyPackage> for KeyPackage
source§impl Serialize for &KeyPackage
impl Serialize for &KeyPackage
source§impl Serialize for KeyPackage
impl Serialize for KeyPackage
source§impl Serialize for KeyPackage
impl Serialize for KeyPackage
source§impl Size for &KeyPackage
impl Size for &KeyPackage
fn tls_serialized_len(&self) -> usize
source§impl Size for KeyPackage
impl Size for KeyPackage
fn tls_serialized_len(&self) -> usize
Auto Trait Implementations§
impl RefUnwindSafe for KeyPackage
impl Send for KeyPackage
impl Sync for KeyPackage
impl Unpin for KeyPackage
impl UnwindSafe for KeyPackage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more