pub struct ContactWrappedKey { /* private fields */ }Expand description
Content key wrapped to a hybrid X25519 + ML-KEM-768 contact.
Implementations§
Source§impl ContactWrappedKey
impl ContactWrappedKey
Sourcepub fn from_parts(
x25519_ephemeral_public_key: Vec<u8>,
mlkem_ciphertext: Vec<u8>,
encrypted_key: Vec<u8>,
) -> Result<ContactWrappedKey, Error>
pub fn from_parts( x25519_ephemeral_public_key: Vec<u8>, mlkem_ciphertext: Vec<u8>, encrypted_key: Vec<u8>, ) -> Result<ContactWrappedKey, Error>
Reconstruct a wrapped key from serialized hybrid ciphertext components.
Returns Error::InvalidKeyMaterial if the component bytes are invalid.
Sourcepub fn x25519_ephemeral_public_key(&self) -> &[u8; 32]
pub fn x25519_ephemeral_public_key(&self) -> &[u8; 32]
Return the ephemeral X25519 public key bytes.
Sourcepub fn ciphertext_bytes(&self) -> &[u8] ⓘ
pub fn ciphertext_bytes(&self) -> &[u8] ⓘ
Return the ML-KEM ciphertext bytes.
Sourcepub fn encrypted_key(&self) -> &[u8] ⓘ
pub fn encrypted_key(&self) -> &[u8] ⓘ
Return the encrypted content-key bytes.
Trait Implementations§
Source§impl Clone for ContactWrappedKey
impl Clone for ContactWrappedKey
Source§fn clone(&self) -> ContactWrappedKey
fn clone(&self) -> ContactWrappedKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContactWrappedKey
impl RefUnwindSafe for ContactWrappedKey
impl Send for ContactWrappedKey
impl Sync for ContactWrappedKey
impl Unpin for ContactWrappedKey
impl UnsafeUnpin for ContactWrappedKey
impl UnwindSafe for ContactWrappedKey
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