pub unsafe fn open(key_id: psa_key_id_t) -> Result<KeyHandle> {
        let mut key_handle: psa_key_handle_t = Default::default();
        let open_key_status = psa_crypto_binding::psa_open_key(key_id, &mut key_handle);
        if open_key_status != PSA_SUCCESS {
            error!("Open key status: {}", open_key_status);
            Err(convert_status(open_key_status))
        } else {
            Ok(KeyHandle(key_handle))
        }
    }
/// Open a key and store the allocated handle for it.
///
/// # 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
Open a key and store the allocated handle for it.
Open a key and store the allocated handle for it .
pub unsafe fn open(key_id: psa_key_id_t) -> Result<KeyHandle> {
        let mut key_handle: psa_key_handle_t = Default::default();
        let open_key_status = psa_crypto_binding::psa_open_key(key_id, &mut key_handle);
        if open_key_status != PSA_SUCCESS {
            error!("Open key status: {}", open_key_status);
            Err(convert_status(open_key_status))
        } else {
            Ok(KeyHandle(key_handle))
        }
    }
pub unsafe fn open ( key_id : psa_key_id_t ) -> Result < KeyHandle > { let mut key_handle : psa_key_handle_t = Default :: default ( ) ; let open_key_status = psa_crypto_binding :: psa_open_key ( key_id , & mut key_handle ) ; if open_key_status != PSA_SUCCESS { error ! ( " " open_key_status ) ; Err ( convert_status ( open_key_status ) ) } else { Ok ( KeyHandle ( key_handle ) ) } }
Open a key and store the allocated handle for it.
Open a key and store the allocated handle for it .
key_id
psa_key_id_t
key_id
psa_key_id_t
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
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