ed25519/src/ed25519.h

39 lines
1.2 KiB
C
Raw Normal View History

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