mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 23:43:34 +08:00
Add crypto key generation functions
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
4c6779812d
commit
3db76d88fe
@@ -73,6 +73,7 @@ size_t keystore_get_key(keystore_session_handle_t handle, uint8_t idx, uint8_t *
|
||||
|
||||
/*
|
||||
* Store a key persistently into the keystore
|
||||
* handle: a handle to an open keystore
|
||||
* idx: key index in keystore
|
||||
* key: pointer to the key
|
||||
* key_size: size of the key
|
||||
@@ -105,6 +106,17 @@ crypto_session_handle_t crypto_open(px4_crypto_algorithm_t algorithm);
|
||||
|
||||
void crypto_close(crypto_session_handle_t *handle);
|
||||
|
||||
/*
|
||||
* Generate a key
|
||||
* handle: Open handle for the crypto session. The key will be generated for
|
||||
* the crypto algorithm used by this session
|
||||
* idx: The key index, by which the key can be used
|
||||
* persistent: if set to "true", the key will be stored into the keystore
|
||||
*/
|
||||
bool crypto_generate_key(crypto_session_handle_t handle,
|
||||
uint8_t idx,
|
||||
bool persistent);
|
||||
|
||||
/*
|
||||
* Get a key from keystore, possibly encrypted
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user