Struct solidity_bindgen::SafeSecretKey [−][src]
pub struct SafeSecretKey { /* fields omitted */ }
Expand description
Securely stores a secret key in memory that is zeroized on drop. Care is taken so that when this struct is constructed or moved that additional copies of the secret are not made in memory or disk. https://github.com/veorq/cryptocoding#clean-memory-of-secret-data
Unfortunately the SafeSecretKey is not magic, there are some things to be aware of when using it…
- The memory used when constructing the secret key must also be zeroized, but this is left as an exercise to the caller.
- If you mem::forget the SafeSecretKey or otherwise don’t drop it, the secret will not be zeroized.
- When the caller lends out a reference to the SecretKey (available for example via Deref) it is the responsibility of the caller to not Clone the SecretKey or otherwise make a copy of it’s memory
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SafeSecretKey
impl Send for SafeSecretKey
impl Sync for SafeSecretKey
impl Unpin for SafeSecretKey
impl UnwindSafe for SafeSecretKey