2024-07-27 13:31:17 +00:00
|
|
|
/**
|
|
|
|
* Storage management
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize storage
|
|
|
|
*/
|
|
|
|
bool storage_init();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Write device name
|
|
|
|
*/
|
|
|
|
void storage_set_dev_name(const char *name);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get current device name
|
|
|
|
*/
|
|
|
|
size_t storage_get_dev_name(char *dest);
|
|
|
|
|
2024-08-15 11:09:01 +00:00
|
|
|
/**
|
|
|
|
* Write private key
|
|
|
|
*/
|
|
|
|
void storage_set_priv_key(unsigned char *key, size_t len);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get current private key
|
|
|
|
*/
|
|
|
|
size_t storage_get_priv_key(unsigned char *key);
|
|
|
|
|
2024-07-27 13:31:17 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|