pub struct EphemeralSecret<T: Zeroize> { /* private fields */ }
Expand description
Ephemeral secret that is automatically zeroized after use
This type wraps any type T and ensures it is zeroized when dropped. It’s useful for temporary secrets and intermediate cryptographic values.
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 is responsible for ensuring the value is properly zeroized.
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> 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>
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> 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