pub struct MailEncryptionKey(/* private fields */);Expand description
Independent X25519 secret. Debug output and implicit serialization are absent.
export_secret is explicit and returns a buffer zeroized on drop.
Implementations§
Source§impl MailEncryptionKey
impl MailEncryptionKey
pub fn generate() -> Result<Self>
pub fn from_secret(bytes: &[u8]) -> Result<Self>
pub fn public_key(&self) -> String
pub fn export_secret(&self) -> Zeroizing<Vec<u8>>
Auto Trait Implementations§
impl Freeze for MailEncryptionKey
impl RefUnwindSafe for MailEncryptionKey
impl Send for MailEncryptionKey
impl Sync for MailEncryptionKey
impl Unpin for MailEncryptionKey
impl UnsafeUnpin for MailEncryptionKey
impl UnwindSafe for MailEncryptionKey
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