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