diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-02 15:29:09 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-02 15:29:09 +0200 |
| commit | 4f13051f763cab3d431847305eff913e4bf9d77a (patch) | |
| tree | bb20393d714ede1a0200653e2bddbbb694b56f16 /libcmix-crypto/api.h | |
| parent | dffdb1388991c5b5688139bfa093c8581a0f3a36 (diff) | |
| download | cmix-4f13051f763cab3d431847305eff913e4bf9d77a.tar.gz cmix-4f13051f763cab3d431847305eff913e4bf9d77a.tar.bz2 cmix-4f13051f763cab3d431847305eff913e4bf9d77a.zip | |
Changed to api to be less repetative in use.
Diffstat (limited to 'libcmix-crypto/api.h')
| -rw-r--r-- | libcmix-crypto/api.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libcmix-crypto/api.h b/libcmix-crypto/api.h new file mode 100644 index 0000000..a798876 --- /dev/null +++ b/libcmix-crypto/api.h @@ -0,0 +1,26 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdbool.h> + +#include "keypair.h" +#include "sharedkey.h" + +typedef struct KeyPair (*KeyPairCreator)(); +typedef void (*KeyPairDeleter)(struct KeyPair); +typedef struct SharedKey (*SharedKeyDeriver)(struct KeyPair, unsigned char*, bool); +typedef void (*SharedKeyDeleter)(struct SharedKey); + +struct Api { + KeyPairCreator create_key_pair; + KeyPairDeleter free_key_pair; + SharedKeyDeriver derive_shared_key; + SharedKeyDeleter free_shared_key; +}; + +#ifdef __cplusplus +} +#endif |
