Wrap crypto_sign macros

This commit is contained in:
Frank Denis
2013-04-21 17:32:10 -07:00
parent d689a92c17
commit 765cad9146
2 changed files with 38 additions and 5 deletions
+24
View File
@@ -1,6 +1,30 @@
#include "crypto_sign.h"
size_t
crypto_sign_bytes(void)
{
return crypto_sign_BYTES;
}
size_t
crypto_sign_publickeybytes(void)
{
return crypto_sign_PUBLICKEYBYTES;
}
size_t
crypto_sign_secretkeybytes(void)
{
return crypto_sign_SECRETKEYBYTES;
}
const char *
crypto_sign_primitive(void)
{
return crypto_sign_PRIMITIVE;
}
int
crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk,
const unsigned char *seed)
+14 -5
View File
@@ -1,17 +1,26 @@
#ifndef crypto_sign_H
#define crypto_sign_H
#include "crypto_sign_ed25519.h"
#include <stdlib.h>
#define crypto_sign_BYTES crypto_sign_ed25519_BYTES
#define crypto_sign_PUBLICKEYBYTES crypto_sign_ed25519_PUBLICKEYBYTES
#define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES
#define crypto_sign_PRIMITIVE "ed25519"
#include "crypto_sign_ed25519.h"
#ifdef __cplusplus
extern "C" {
#endif
#define crypto_sign_BYTES crypto_sign_ed25519_BYTES
size_t crypto_sign_bytes(void);
#define crypto_sign_PUBLICKEYBYTES crypto_sign_ed25519_PUBLICKEYBYTES
size_t crypto_sign_publickeybytes(void);
#define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES
size_t crypto_sign_secretkeybytes(void);
#define crypto_sign_PRIMITIVE "ed25519"
const char *crypto_sign_primitive(void);
int crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk,
const unsigned char *seed);