ed25519/src/ed25519.h

39 lines
1.2 KiB
C
Raw Normal View History

2013-01-11 18:54:40 -05:00
#ifndef ED25519_H
#define ED25519_H
2013-01-21 16:50:09 -05:00
#include <stddef.h>
2013-01-22 04:58:57 -05:00
#if defined(_WIN32)
2013-04-26 09:32:01 -04:00
#if defined(ED25519_BUILD_DLL)
#define ED25519_DECLSPEC __declspec(dllexport)
#elif defined(ED25519_DLL)
#define ED25519_DECLSPEC __declspec(dllimport)
#else
#define ED25519_DECLSPEC
#endif
2013-01-22 04:58:57 -05:00
#else
2013-04-26 09:32:01 -04:00
#define ED25519_DECLSPEC
2013-01-22 04:58:57 -05:00
#endif
#ifdef __cplusplus
extern "C" {
#endif
2013-01-11 18:54:40 -05:00
#ifndef ED25519_NO_SEED
2013-01-22 04:58:57 -05:00
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);
2013-02-04 11:56:19 -05:00
void ED25519_DECLSPEC ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, const unsigned char *scalar);
2013-03-24 17:37:43 -04:00
void ED25519_DECLSPEC ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *public_key, const unsigned char *private_key);
2013-01-22 05:04:36 -05:00
2013-01-22 04:58:57 -05:00
#ifdef __cplusplus
}
2013-01-11 18:54:40 -05:00
#endif
#endif