Struct core_crypto::prelude::KeyPackage
pub struct KeyPackage { /* private fields */ }
Expand description
The key package struct.
Implementations§
§impl KeyPackage
impl KeyPackage
pub fn builder() -> KeyPackageBuilder
pub fn builder() -> KeyPackageBuilder
Create a key package builder.
This is provided for convenience. You can also use [KeyPackageBuilder::new
].
pub async fn delete<KeyStore>(
&self,
backend: &impl OpenMlsCryptoProvider<KeyStoreProvider = KeyStore>,
) -> Result<(), KeyPackageDeleteError<<KeyStore as OpenMlsKeyStore>::Error>>where
KeyStore: OpenMlsKeyStore,
pub async fn delete<KeyStore>(
&self,
backend: &impl OpenMlsCryptoProvider<KeyStoreProvider = KeyStore>,
) -> Result<(), KeyPackageDeleteError<<KeyStore as OpenMlsKeyStore>::Error>>where
KeyStore: OpenMlsKeyStore,
Delete this key package and its private key from the key store.
pub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Get a reference to the extensions of this key package.
pub 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.
pub fn hash_ref(
&self,
backend: &impl OpenMlsCrypto,
) -> Result<HashReference, LibraryError>
pub fn hash_ref( &self, backend: &impl OpenMlsCrypto, ) -> Result<HashReference, LibraryError>
Compute the KeyPackageRef
of this KeyPackage
.
The KeyPackageRef
is used to identify a new member that should get
added to a group.
pub fn ciphersuite(&self) -> Ciphersuite
pub fn ciphersuite(&self) -> Ciphersuite
Get the Ciphersuite
.
pub fn leaf_node(&self) -> &LeafNode
pub fn leaf_node(&self) -> &LeafNode
Get the [LeafNode
] reference.
pub fn hpke_init_key(&self) -> &VLBytes
pub fn hpke_init_key(&self) -> &VLBytes
Get the public HPKE init key of this key package.
impl KeyPackage
This impl block contains no items.
Crate visible KeyPackage
functions.
Trait Implementations§
§impl Clone for KeyPackage
impl Clone for KeyPackage
§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 more§impl Debug for KeyPackage
impl Debug for KeyPackage
§impl<'de> Deserialize<'de> for KeyPackage
impl<'de> Deserialize<'de> for KeyPackage
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyPackage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyPackage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<KeyPackage> for KeyPackageIn
impl From<KeyPackage> for KeyPackageIn
§fn from(value: KeyPackage) -> KeyPackageIn
fn from(value: KeyPackage) -> KeyPackageIn
Converts to this type from the input type.
§impl From<KeyPackageIn> for KeyPackage
impl From<KeyPackageIn> for KeyPackage
§fn from(value: KeyPackageIn) -> KeyPackage
fn from(value: KeyPackageIn) -> KeyPackage
Converts to this type from the input type.
§impl MlsEntity for KeyPackage
impl MlsEntity for KeyPackage
§impl PartialEq for KeyPackage
impl PartialEq for KeyPackage
§impl Serialize for &KeyPackage
impl Serialize for &KeyPackage
§impl Serialize for KeyPackage
impl Serialize for KeyPackage
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl Serialize for KeyPackage
impl Serialize for KeyPackage
§impl SignedStruct<KeyPackageTbs> for KeyPackage
impl SignedStruct<KeyPackageTbs> for KeyPackage
§fn from_payload(payload: KeyPackageTbs, signature: Signature) -> KeyPackage
fn from_payload(payload: KeyPackageTbs, signature: Signature) -> KeyPackage
Build a signed struct version from the payload struct.
§impl Size for &KeyPackage
impl Size for &KeyPackage
fn tls_serialized_len(&self) -> usize
§impl Size for KeyPackage
impl Size for KeyPackage
fn tls_serialized_len(&self) -> usize
§impl VerifiedStruct<VerifiableKeyPackage> for KeyPackage
impl VerifiedStruct<VerifiableKeyPackage> for KeyPackage
§type SealingType = Seal
type SealingType = Seal
This type is used to prevent users of the trait from bypassing
verify
by simply calling from_verifiable
. Seal
should be a dummy type
defined in a private module as follows: Read moreAuto Trait Implementations§
impl Freeze for KeyPackage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read moresource§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more