pub struct KeyPackage {
pub version: ProtocolVersion,
pub cipher_suite: CipherSuite,
pub init_key: HPKEPublicKey,
pub leaf_node: LeafNode,
pub extensions: Extensions,
pub signature: Bytes,
}
Expand description
RFC9420 Sec.10 KeyPackage
Fields§
§version: ProtocolVersion
§cipher_suite: CipherSuite
§init_key: HPKEPublicKey
§leaf_node: LeafNode
§extensions: Extensions
§signature: Bytes
Implementations§
Source§impl KeyPackage
impl KeyPackage
Sourcepub fn verify(
&self,
crypto_provider: &impl CryptoProvider,
ctx: &GroupContext,
) -> Result<()>
pub fn verify( &self, crypto_provider: &impl CryptoProvider, ctx: &GroupContext, ) -> Result<()>
RFC9420 Sec.10.1 KeyPackage Validation
Sourcepub fn generate_ref(
&self,
crypto_provider: &impl CryptoProvider,
) -> Result<KeyPackageRef>
pub fn generate_ref( &self, crypto_provider: &impl CryptoProvider, ) -> Result<KeyPackageRef>
RFC9420 Sec.5.2 Generate a KeyPackageRef with the value input is the encoded KeyPackage, and the cipher suite specified in the KeyPackage determines the KDF used
Trait Implementations§
Source§impl Clone for KeyPackage
impl Clone for KeyPackage
Source§fn clone(&self) -> KeyPackage
fn clone(&self) -> KeyPackage
Returns a duplicate 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 Default for KeyPackage
impl Default for KeyPackage
Source§fn default() -> KeyPackage
fn default() -> KeyPackage
Returns the “default value” for a type. Read more
Source§impl Deserializer for KeyPackage
impl Deserializer for KeyPackage
Source§impl PartialEq for KeyPackage
impl PartialEq for KeyPackage
Source§impl Serializer for KeyPackage
impl Serializer for KeyPackage
impl Eq for KeyPackage
impl StructuralPartialEq for KeyPackage
Auto 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