pub fn purge()
Expand description

Remove non-essential copies of key material from memory

This function will remove these extra copies of the key material from memory.

This function is not required to remove key material from memory in any of the following situations: The key is currently in use in a cryptographic operation. The key is volatile.

Example

use psa_crypto::operations::key_management;
use psa_crypto::types::key::{Attributes, Type, Lifetime, Policy, UsageFlags};
use psa_crypto::types::algorithm::{AsymmetricSignature, Hash};
psa_crypto::init().unwrap();
//let my_key = key_management::generate(attributes, None).unwrap();
//let size = key_management::purge(my_key).unwrap();