ed25519/src/ed25519.h

36 lines
911 B
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)
#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
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
2013-01-22 05:31:58 -05:00
void ED25519_DECLSPEC ed25519_create_keypair(unsigned char *verify_key, unsigned char *sign_key, const unsigned char *seed);
void ED25519_DECLSPEC ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *sign_key);
2013-01-22 05:04:36 -05:00
int ED25519_DECLSPEC ed25519_verify(const unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *verify_key);
2013-01-22 04:58:57 -05:00
#ifdef __cplusplus
}
2013-01-11 18:54:40 -05:00
#endif
#endif