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
sourceimpl Unencrypted
impl Unencrypted
sourcepub fn map<F, T>(&self, fun: F) -> T where
F: FnMut(&SecretKeyMaterial) -> T,
pub fn map<F, T>(&self, fun: F) -> T where
F: FnMut(&SecretKeyMaterial) -> T,
Maps the given function over the secret.
Trait Implementations
sourceimpl Clone for Unencrypted
impl Clone for Unencrypted
sourcefn clone(&self) -> Unencrypted
fn clone(&self) -> Unencrypted
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Unencrypted
impl Debug for Unencrypted
sourceimpl From<SecretKeyMaterial> for Unencrypted
impl From<SecretKeyMaterial> for Unencrypted
sourcefn from(mpis: SecretKeyMaterial) -> Self
fn from(mpis: SecretKeyMaterial) -> Self
Converts to this type from the input type.
sourceimpl From<Unencrypted> for SecretKeyMaterial
impl From<Unencrypted> for SecretKeyMaterial
sourcefn from(key: Unencrypted) -> Self
fn from(key: Unencrypted) -> Self
Converts to this type from the input type.
sourceimpl Hash for Unencrypted
impl Hash for Unencrypted
sourceimpl PartialEq<Unencrypted> for Unencrypted
impl PartialEq<Unencrypted> for Unencrypted
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &Unencrypted) -> bool
fn ne(&self, other: &Unencrypted) -> bool
This method tests for !=
.
impl Eq for Unencrypted
impl StructuralEq for Unencrypted
impl StructuralPartialEq for Unencrypted
Auto Trait Implementations
impl RefUnwindSafe for Unencrypted
impl Send for Unencrypted
impl Sync for Unencrypted
impl Unpin for Unencrypted
impl UnwindSafe for Unencrypted
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more