Files
kunlun/sp/boot/crypto/inc/keystorage_private.h
2024-09-28 14:24:04 +08:00

32 lines
588 B
C

// Functionality for internal usage only
// TODO: USE EFUSE FOR RISC-V BUILD
#ifndef iotelic_keystorage_H
#define iotelic_keystorage_H
#include <stdint.h>
#include "global.h"
#include "keystorage_slots.h"
typedef enum {
KEYSTORAGE_ERROR_GENERAL = -1,
KEYSTORAGE_ERROR_PARAMS = -2,
} KEYSTORAGE_RESULT;
#ifdef __cplusplus
extern "C" {
#endif
int
keystorage_save(KEYSTORAGE_SLOT slot, const uint8_t * data, size_t data_sz);
int
keystorage_load(KEYSTORAGE_SLOT slot, uint8_t * data, size_t buf_sz, size_t * read_sz);
#ifdef __cplusplus
}
#endif
#endif // iotelic_keystorage