pub unsafe fn close(&mut self) -> Result<()> {
        let status = psa_crypto_binding::psa_close_key(self.0);

        if status != PSA_SUCCESS {
            error!("Close key status: {}", status);
            Err(convert_status(status))
        } else {
            Ok(())
        }
    }
/// Release the key stored under this handle.
///
/// # Safety
///
/// Calling this function is only safe if:
/// * the Mbed Crypto library has already been initialized
/// * calls to open, generate, import and close are protected by the same mutex
/// * only PSA_KEY_SLOT_COUNT slots are used at any given time
///
/// Because of the conditions above, it is not safe to put this function inside a Drop trait as
/// it would make possible for this function to be executed in an unsafe context.
Release the key stored under this handle.
Release the key stored under this handle .
pub unsafe fn close(&mut self) -> Result<()> {
        let status = psa_crypto_binding::psa_close_key(self.0);
        if status != PSA_SUCCESS {
            error!("Close key status: {}", status);
            Err(convert_status(status))
        } else {
            Ok(())
        }
    }
pub unsafe fn close ( & mut self ) -> Result < ( ) > { let status = psa_crypto_binding :: psa_close_key ( self . 0 ) ; if status != PSA_SUCCESS { error ! ( " " status ) ; Err ( convert_status ( status ) ) } else { Ok ( ( ) ) } }
Release the key stored under this handle.
Release the key stored under this handle .
&mut self
&mut self
safety
Calling this function is only safe if:
the Mbed Crypto library has already been initialized
calls to open, generate, import and close are protected by the same mutex
only PSA_KEY_SLOT_COUNT slots are used at any given time

Because of the conditions above, it is not safe to put this function inside a Drop trait as
it would make possible for this function to be executed in an unsafe context.
Calling this function is only safe if : the Mbed Crypto library has already been initialized calls to open generate import and close are protected by the same mutex only PSA_KEY_SLOT_COUNT slots are used at any given time Because of the conditions above it is not safe to put this function inside a Drop trait as it would make possible for this function to be executed in an unsafe context .