Function il2_utils::mem::create_protected_value[][src]

pub fn create_protected_value(value: &[u8]) -> Arc<dyn ProtectedValue>
Expand description

Creates a protected value repository. It always uses the best protection method available to the underlying platform.

It always returns a std::sync::Arc of the value because the protection mechanism may be too expensive to create and/or maintain. Furthermore, it is better to keep this kind of secret as isolated as possible inside the memory.

Returns the protected value.