Expand description
This module implement functions that can be used to control the page locking in memory. This is useful to prevent critical values from being written into the the disk by the virtual memory system.
Modules§
- impl_
linux - This module provides the Linux implementation of the memory manipulation functions.
Structs§
- Default
Protected Value - This struct implements the the default implementation of the
ProtectedValue
trait. It uses a random mask to protect the value stored in memory from simple memory scan attacks. - Secret
Bytes - This struct wraps a byte array that is guaranteed to have its contents shredded upon destruction.
Traits§
- Protected
Value - 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.
Functions§
- create_
protected_ value - Creates a protected value repository. It always uses the best protection method available to the underlying platform.
- lock_
mem - Try to lock the memory segment into memory, preventing it from
being moved to the disk. All calls to this function must be
followed by a call to
unlock_mem()
. - lock_
supported - Determines if this platform supports memory locking or not.
- unlock_
mem - Unlocks the memory segment. It reverts the effects of
lock_mem()
.