Struct sequoia_openpgp::packet::key::Unencrypted
source · pub struct Unencrypted { /* private fields */ }
Expand description
Unencrypted secret key material.
This data structure is used by the SecretKeyMaterial
enum.
Unlike an Encrypted
key, this key an be used as-is.
The secret key is encrypted in memory and only decrypted on demand. This helps protect against heartbleed-style attacks where a buffer over-read allows an attacker to read from the process’s address space. This protection is less important for Rust programs, which are memory safe. However, it is essential when Sequoia is used via its FFI.
See crypto::mem::Encrypted
for details.
Implementations§
source§impl Unencrypted
impl Unencrypted
sourcepub fn map<F, T>(&self, fun: F) -> Twhere
F: FnMut(&SecretKeyMaterial) -> T,
pub fn map<F, T>(&self, fun: F) -> Twhere
F: FnMut(&SecretKeyMaterial) -> T,
Maps the given function over the secret.
Trait Implementations§
source§impl Clone for Unencrypted
impl Clone for Unencrypted
source§fn clone(&self) -> Unencrypted
fn clone(&self) -> Unencrypted
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Unencrypted
impl Debug for Unencrypted
source§impl From<SecretKeyMaterial> for Unencrypted
impl From<SecretKeyMaterial> for Unencrypted
source§fn from(mpis: SecretKeyMaterial) -> Self
fn from(mpis: SecretKeyMaterial) -> Self
Converts to this type from the input type.
source§impl From<Unencrypted> for SecretKeyMaterial
impl From<Unencrypted> for SecretKeyMaterial
source§fn from(key: Unencrypted) -> Self
fn from(key: Unencrypted) -> Self
Converts to this type from the input type.
source§impl Hash for Unencrypted
impl Hash for Unencrypted
source§impl PartialEq for Unencrypted
impl PartialEq for Unencrypted
source§fn eq(&self, other: &Unencrypted) -> bool
fn eq(&self, other: &Unencrypted) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Unencrypted
impl StructuralPartialEq for Unencrypted
Auto Trait Implementations§
impl Freeze for Unencrypted
impl RefUnwindSafe for Unencrypted
impl Send for Unencrypted
impl Sync for Unencrypted
impl Unpin for Unencrypted
impl UnwindSafe for Unencrypted
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)