attempt to fix export issue of the ed25519 functions to unit tests

This commit is contained in:
Arvid Norberg 2013-08-19 06:45:56 +00:00
parent b431ef7836
commit 2dc6f50f88
1 changed files with 13 additions and 0 deletions

View File

@ -45,6 +45,19 @@ POSSIBILITY OF SUCH DAMAGE.
#define EXPORT BOOST_SYMBOL_IMPORT #define EXPORT BOOST_SYMBOL_IMPORT
#endif #endif
// the unit tests need access to these.
// they are built into the unit test library as well.
// not exported from libtorrent itself
extern "C"
{
int TORRENT_EXPORT ed25519_create_seed(unsigned char *seed);
void TORRENT_EXPORT ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed);
void TORRENT_EXPORT ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key, const unsigned char *private_key);
int TORRENT_EXPORT ed25519_verify(const unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *private_key);
void TORRENT_EXPORT ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, const unsigned char *scalar);
void TORRENT_EXPORT ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *public_key, const unsigned char *private_key);
}
void EXPORT report_failure(char const* err, char const* file, int line); void EXPORT report_failure(char const* err, char const* file, int line);
#if defined(_MSC_VER) #if defined(_MSC_VER)