pub struct SecretKey(/* private fields */);Expand description
A secret key that is automatically zeroed from memory when dropped. Use this to hold AES encryption keys — prevents leak via memory dump.
use overdrive::SecretKey;
let key = SecretKey::from_env("ODB_KEY").unwrap();
// ...key bytes are wiped from RAM when `key` is droppedImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnsafeUnpin for SecretKey
impl UnwindSafe for SecretKey
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