Wrap crypto_scalarmult macros.

This commit is contained in:
Frank Denis
2013-04-21 17:32:10 -07:00
parent 98da611f98
commit 4a9a9ffeb8
2 changed files with 29 additions and 4 deletions
@@ -1,6 +1,24 @@
#include "crypto_scalarmult.h"
size_t
crypto_scalarmult_bytes(void)
{
return crypto_scalarmult_BYTES;
}
size_t
crypto_scalarmult_scalarbytes(void)
{
return crypto_scalarmult_SCALARBYTES;
}
const char *
crypto_scalarmult_primitive(void)
{
return crypto_scalarmult_PRIMITIVE;
}
int
crypto_scalarmult_base(unsigned char *q, const unsigned char *n)
{
@@ -1,16 +1,23 @@
#ifndef crypto_scalarmult_H
#define crypto_scalarmult_H
#include "crypto_scalarmult_curve25519.h"
#include <stdlib.h>
#define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES
#define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES
#define crypto_scalarmult_PRIMITIVE "curve25519"
#include "crypto_scalarmult_curve25519.h"
#ifdef __cplusplus
extern "C" {
#endif
#define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES
size_t crypto_scalarmult_bytes(void);
#define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES
size_t crypto_scalarmult_scalarbytes(void);
#define crypto_scalarmult_PRIMITIVE "curve25519"
const char *crypto_scalarmult_primitive(void);
int crypto_scalarmult_base(unsigned char *q, const unsigned char *n);
int crypto_scalarmult(unsigned char *q, const unsigned char *n,