pub struct AgileKeyPair {
pub public: AgilePublicKey,
pub secret: AgileSecretKey,
}Expand description
Generated crypto-agile (AgilePublicKey, AgileSecretKey) pair.
Fields§
§public: AgilePublicKeyPublic encapsulation key.
secret: AgileSecretKeyPrivate decapsulation key (zeroized on drop).
Implementations§
Source§impl AgileKeyPair
impl AgileKeyPair
Sourcepub fn generate(policy: SecurityPolicy, algorithm: KemAlgorithm) -> Result<Self>
pub fn generate(policy: SecurityPolicy, algorithm: KemAlgorithm) -> Result<Self>
Generates a fresh key pair for algorithm under policy using the OS CSPRNG.
Auto Trait Implementations§
impl Freeze for AgileKeyPair
impl RefUnwindSafe for AgileKeyPair
impl Send for AgileKeyPair
impl Sync for AgileKeyPair
impl Unpin for AgileKeyPair
impl UnsafeUnpin for AgileKeyPair
impl UnwindSafe for AgileKeyPair
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