pub struct DefaultProtectedValue { /* private fields */ }
Expand description
This struct implements the the default implementation of the
ProtectedValue
trait. It uses a random mask to protect the value stored
in memory from simple memory scan attacks.
It is not the most sophisticated approach to this problem but is guaranteed to work on all platforms.
Implementations§
Trait Implementations§
Source§impl ProtectedValue for DefaultProtectedValue
impl ProtectedValue for DefaultProtectedValue
Source§fn get_secret(&self) -> SecretBytes
fn get_secret(&self) -> SecretBytes
Returns the protected value as a
SecretBytes
instance.Auto Trait Implementations§
impl Freeze for DefaultProtectedValue
impl RefUnwindSafe for DefaultProtectedValue
impl Send for DefaultProtectedValue
impl Sync for DefaultProtectedValue
impl Unpin for DefaultProtectedValue
impl UnwindSafe for DefaultProtectedValue
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