pub fn purge(/*key_id: Id*/) /*-> Result<()>*/
{
    error!("This operation is not yet supported by Mbed Crypto. Once it is supported, uncomment and remove this notice");
    // Also uncomment the example
    /*initialized()?;
    let handle = key_id.handle()?;
    let purge_res = Status::from(psa_crypto_sys::psa_purge_key(handle)).to_result()
    let close_handle_res = key_id.close_handle(handle);
    purge_res?;
    close_handle_res*/
}
/// 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};
/// # let mut usage_flags: UsageFlags = Default::default();
/// # usage_flags.set_cache();
/// # let mut attributes = Attributes {
/// #     key_type: Type::RsaKeyPair,
/// #     bits: 1024,
/// #     lifetime: Lifetime::Volatile,
/// #     policy: Policy {
/// #         usage_flags,
/// #         permitted_algorithms: AsymmetricSignature::RsaPkcs1v15Sign {
/// #             hash_alg: Hash::Sha256.into(),
/// #         }.into(),
/// #     },
/// # };
/// psa_crypto::init().unwrap();
/// //let my_key = key_management::generate(attributes, None).unwrap();
/// //let size = key_management::purge(my_key).unwrap();
/// ```
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.
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 .
pub fn purge(/*key_id: Id*/) /*-> Result<()>*/
{
    error!("This operation is not yet supported by Mbed Crypto. Once it is supported, uncomment and remove this notice");
    // Also uncomment the example
    /*initialized()?;
    let handle = key_id.handle()?;
    let purge_res = Status::from(psa_crypto_sys::psa_purge_key(handle)).to_result()
    let close_handle_res = key_id.close_handle(handle);
    purge_res?;
    close_handle_res*/
}
pub fn purge ( /*key_id: Id*/ ) /*-> Result<()>*/ { error ! ( " " ) ; // Also uncomment the example /*initialized()?;
    let handle = key_id.handle()?;
    let purge_res = Status::from(psa_crypto_sys::psa_purge_key(handle)).to_result()
    let close_handle_res = key_id.close_handle(handle);
    purge_res?;
    close_handle_res*/ }
Remove non-essential copies of key material from memory
This function will remove these extra copies of the key material from memory.
Remove non - essential copies of key material from memory This function will remove these extra copies of the key material from memory .
example
```
use psa_crypto::operations::key_management;
use psa_crypto::types::key::{Attributes, Type, Lifetime, Policy, UsageFlags};
use psa_crypto::types::algorithm::{AsymmetricSignature, Hash}.
` ` ` use psa_crypto :: operations :: key_management ; use psa_crypto :: types :: key :: { Attributes Type Lifetime Policy UsageFlags } ; use psa_crypto :: types :: algorithm :: { AsymmetricSignature Hash } .
let mut usage_flags: usageflags = default::default();
None
usage_flags.set_cache();
None
let mut attributes = attributes {
None
key_type: type::rsakeypair,
None
bits: 1024,
None
lifetime: lifetime::volatile,
None
policy: policy {
None
usage_flags,
None
permitted_algorithms: asymmetricsignature::rsapkcs1v15sign {
None
hash_alg: hash::sha256.into(),
None
}.into(),
None
},
None
};
:init().unwrap();
let my_key = key_management::generate(attributes, None).unwrap();
let size = key_management::purge(my_key).unwrap();
```
: init () . unwrap () ; let my_key = key_management :: generate ( attributes None ) . unwrap () ; let size = key_management :: purge ( my_key ) . unwrap () ; ` ` `