pub struct EncapsulationKey1024 { /* private fields */ }
Expand description
1024-bit ml-kem encapsulation key
Implementations§
Source§impl EncapsulationKey1024
impl EncapsulationKey1024
pub fn from(ek: EncapsulationKey<MlKem1024Params>) -> Self
Sourcepub fn from_bytes(bytes: &[u8; 1568]) -> Option<Self>
pub fn from_bytes(bytes: &[u8; 1568]) -> Option<Self>
Encapsulation key deserialization
Sourcepub fn encapsulate<CryptoRngCore>(
self,
rng: &mut CryptoRngCore,
) -> Option<([u8; 1568], [u8; 32])>
pub fn encapsulate<CryptoRngCore>( self, rng: &mut CryptoRngCore, ) -> Option<([u8; 1568], [u8; 32])>
Encapsulates random bytes
Auto Trait Implementations§
impl Freeze for EncapsulationKey1024
impl RefUnwindSafe for EncapsulationKey1024
impl Send for EncapsulationKey1024
impl Sync for EncapsulationKey1024
impl Unpin for EncapsulationKey1024
impl UnwindSafe for EncapsulationKey1024
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