diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-03-03 11:14:50 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-03-03 11:14:50 +0000 |
commit | 3ce450fc1984ac480ae158a40d60e9d42f77f74a (patch) | |
tree | eb120d958eac8361d3760b9ad680fd8dc826d7a3 /lib/ed25519/src/ed25519.h | |
parent | 8bf99544160b1fd787e666b893c5117ab717bc99 (diff) | |
parent | 498dfabf9848286be003b42941c323a045d9fa46 (diff) |
Merge commit '498dfabf9848286be003b42941c323a045d9fa46' as 'lib/ed25519'
Diffstat (limited to 'lib/ed25519/src/ed25519.h')
-rw-r--r-- | lib/ed25519/src/ed25519.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/ed25519/src/ed25519.h b/lib/ed25519/src/ed25519.h new file mode 100644 index 0000000..8924659 --- /dev/null +++ b/lib/ed25519/src/ed25519.h @@ -0,0 +1,38 @@ +#ifndef ED25519_H +#define ED25519_H + +#include <stddef.h> + +#if defined(_WIN32) + #if defined(ED25519_BUILD_DLL) + #define ED25519_DECLSPEC __declspec(dllexport) + #elif defined(ED25519_DLL) + #define ED25519_DECLSPEC __declspec(dllimport) + #else + #define ED25519_DECLSPEC + #endif +#else + #define ED25519_DECLSPEC +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef ED25519_NO_SEED +int ED25519_DECLSPEC ed25519_create_seed(unsigned char *seed); +#endif + +void ED25519_DECLSPEC ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed); +void ED25519_DECLSPEC ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key, const unsigned char *private_key); +int ED25519_DECLSPEC ed25519_verify(const unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key); +void ED25519_DECLSPEC ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, const unsigned char *scalar); +void ED25519_DECLSPEC ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *public_key, const unsigned char *private_key); + + +#ifdef __cplusplus +} +#endif + +#endif |