pub trait ProtectedValue: Send + Sync {
// Required method
fn get_secret(&self) -> SecretBytes;
}
Expand description
This trait implements a way to protect secret values stored in memory against potential memory scan techniques. The value is stored in a obfuscated and/or encrypted form that is reversed only when the actual value is needed by the application.
Although not enough to provide a long term protection, it should be enough to make memory scan techniques way more difficult to perform.
Required Methods§
Sourcefn get_secret(&self) -> SecretBytes
fn get_secret(&self) -> SecretBytes
Returns the protected value as a SecretBytes
instance.