pub struct EphemeralSecret<T: Zeroize> { /* private fields */ }Expand description
Ephemeral secret that invokes explicit clearing on drop.
This type wraps a value and invokes its Zeroize implementation on drop.
It is useful for temporary secrets and intermediate cryptographic values,
subject to the module-level limits of best-effort software clearing.
Implementations§
Source§impl<T: Zeroize> EphemeralSecret<T>
impl<T: Zeroize> EphemeralSecret<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consume the secret and return the inner value
Note: after calling this method, the caller owns the value and is responsible for invoking its clearing policy when appropriate.
Trait Implementations§
Source§impl<T: Zeroize> AsMut<T> for EphemeralSecret<T>
impl<T: Zeroize> AsMut<T> for EphemeralSecret<T>
Source§impl<T: Zeroize> AsRef<T> for EphemeralSecret<T>
impl<T: Zeroize> AsRef<T> for EphemeralSecret<T>
Source§impl<T: Zeroize> Debug for EphemeralSecret<T>
impl<T: Zeroize> Debug for EphemeralSecret<T>
Source§impl<T: Zeroize> Deref for EphemeralSecret<T>
impl<T: Zeroize> Deref for EphemeralSecret<T>
Source§impl<T: Zeroize> DerefMut for EphemeralSecret<T>
impl<T: Zeroize> DerefMut for EphemeralSecret<T>
Source§impl<T: Zeroize> Drop for EphemeralSecret<T>
impl<T: Zeroize> Drop for EphemeralSecret<T>
Auto Trait Implementations§
impl<T> Freeze for EphemeralSecret<T>where
T: Freeze,
impl<T> RefUnwindSafe for EphemeralSecret<T>where
T: RefUnwindSafe,
impl<T> Send for EphemeralSecret<T>where
T: Send,
impl<T> Sync for EphemeralSecret<T>where
T: Sync,
impl<T> Unpin for EphemeralSecret<T>where
T: Unpin,
impl<T> UnsafeUnpin for EphemeralSecret<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for EphemeralSecret<T>where
T: UnwindSafe,
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