mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Wrap crypto_scalarmult macros.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user