custom-tee-storage/bliq_storage/ta/operations.h

28 lines
527 B
C
Raw Normal View History

2024-03-21 22:12:03 +01:00
#include <tee_internal_api.h>
#ifndef OPERATIONS_H
#define OPERATIONS_H
typedef struct {
TEE_OperationHandle hSK_encrypt;
TEE_OperationHandle hSK_decrypt;
} Session;
TEE_Result so_init(
char *pin, size_t pin_sz,
Session *session);
void so_free(
Session *session);
TEE_Result so_encrypt(
Session *session,
void *inbuf, uint32_t inbuf_sz,
void *outbuf, uint32_t *outbuf_sz);
TEE_Result so_decrypt(
Session *session,
void *inbuf, uint32_t inbuf_sz,
void *outbuf, uint32_t *outbuf_sz);
#endif /*OPERATIONS_H*/