Struct il2_utils::mem::DefaultProtectedValue[][src]

pub struct DefaultProtectedValue { /* fields omitted */ }
Expand description

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.

It is not the most sophisticated approach to this problem but is guaranteed to work on all platforms.

Implementations

Creates a new DefaultProtectedValue with the given value.

Arguments:

  • value: The value to be protected;

Trait Implementations

Returns the protected value as a SecretBytes instance.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.