pub struct HybridKeyPackage {
pub classical_pk: [u8; 32],
pub ml_kem_pk: Vec<u8>,
}Fields§
§classical_pk: [u8; 32]Classical public key. Encoded as raw bytes; semantics depend on the build (X25519 32-byte key by default, P-256 uncompressed SEC1 65-byte key under fips).
ml_kem_pk: Vec<u8>Implementations§
Source§impl HybridKeyPackage
impl HybridKeyPackage
pub fn encapsulate(&self) -> Result<([u8; 32], HybridCiphertext), Error>
Trait Implementations§
Source§impl BorshDeserialize for HybridKeyPackage
impl BorshDeserialize for HybridKeyPackage
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for HybridKeyPackage
impl BorshSerialize for HybridKeyPackage
Source§impl Clone for HybridKeyPackage
impl Clone for HybridKeyPackage
Source§fn clone(&self) -> HybridKeyPackage
fn clone(&self) -> HybridKeyPackage
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 HybridKeyPackage
impl RefUnwindSafe for HybridKeyPackage
impl Send for HybridKeyPackage
impl Sync for HybridKeyPackage
impl Unpin for HybridKeyPackage
impl UnsafeUnpin for HybridKeyPackage
impl UnwindSafe for HybridKeyPackage
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