Secret#
Functions
-
int secret_init(struct kvstore *nvs)#
Initialize the secret management module.
- Parameters:
nvs – [in] Pointer to the key-value store structure.
- Returns:
0 on success, negative error code on failure.
-
int secret_read(secret_key_t key, void *buf, size_t bufsize)#
Read a secret value.
- Parameters:
key – [in] The secret key to read.
buf – [out] Buffer to store the read value.
bufsize – [in] Size of the buffer.
- Returns:
0 on success, negative error code on failure.
-
int secret_save(secret_key_t key, const void *data, size_t datasize)#
Save secret data associated with a given key.
This function saves the secret data associated with the specified key.
- Parameters:
key – [in] The key associated with the secret data.
data – [in] Pointer to the data to be saved.
datasize – [in] Size of the data to be saved.
- Returns:
int 0 on success, or a negative error code on failure.