Trait ProtectedValue

Source
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§

Source

fn get_secret(&self) -> SecretBytes

Returns the protected value as a SecretBytes instance.

Implementors§