EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
zymkey4_driver.h
Go to the documentation of this file.
1 
11 #ifndef ZYMKEY4_DRIVER_H
12 #define ZYMKEY4_DRIVER_H
13 #include <sys/types.h>
14 #include <zymkey/zk_app_utils.h>
15 
21 zkCTX *init_zymkey4(void);
22 
29 int close_zymkey4(zkCTX *ctx);
30 
39 int generate_zymkey4_key(zkCTX *ctx, uint8_t *key, size_t key_size);
40 
51 int encrypt_zymkey4_blob(zkCTX *ctx, uint8_t *in, size_t in_size, uint8_t **out,
52  size_t *out_size);
53 
64 int decrypt_zymkey4_blob(zkCTX *ctx, uint8_t *in, size_t in_size, uint8_t **out,
65  size_t *out_size);
66 #endif
int close_zymkey4(zkCTX *ctx)
Closes the zymkey4 context.
Definition: zymkey4_driver.c:35
int decrypt_zymkey4_blob(zkCTX *ctx, uint8_t *in, size_t in_size, uint8_t **out, size_t *out_size)
Decrypt a byte array wiht the Zymkey4 HSM.
Definition: zymkey4_driver.c:76
int generate_zymkey4_key(zkCTX *ctx, uint8_t *key, size_t key_size)
Generate a random Zymkey4 key.
Definition: zymkey4_driver.c:45
zkCTX * init_zymkey4(void)
Initialises an HSM context.
Definition: zymkey4_driver.c:19
int encrypt_zymkey4_blob(zkCTX *ctx, uint8_t *in, size_t in_size, uint8_t **out, size_t *out_size)
Encrypt a byte array wiht the Zymkey4 HSM.
Definition: zymkey4_driver.c:64