1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

crypto_box_curve25519xsalsa20poly1305_ref compat

This commit is contained in:
Frank Denis 2013-04-22 22:15:19 -07:00
parent cb7c294cb8
commit 393aa1a229
2 changed files with 71 additions and 1 deletions

View File

@ -11,7 +11,6 @@
extern "C" {
#endif
SODIUM_EXPORT
int crypto_sign_ed25519(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);

View File

@ -3,6 +3,10 @@
#include "crypto_auth_hmacsha512256.h"
#include "export.h"
#ifdef __cplusplus
extern "C" {
#endif
#undef crypto_auth_hmacsha256_ref
SODIUM_EXPORT int
crypto_auth_hmacsha256_ref(unsigned char *out, const unsigned char *in,
@ -38,3 +42,70 @@ crypto_auth_hmacsha512256_ref_verify(const unsigned char *h,
{
return crypto_auth_hmacsha512256_verify(h, in, inlen, k);
}
#undef crypto_box_curve25519xsalsa20poly1305_ref_keypair
SODIUM_EXPORT int
crypto_box_curve25519xsalsa20poly1305_ref_keypair(unsigned char *pk,
unsigned char *sk)
{
return crypto_box_curve25519xsalsa20poly1305_keypair(pk, sk);
}
#undef crypto_box_curve25519xsalsa20poly1305_ref_beforenm
SODIUM_EXPORT int
crypto_box_curve25519xsalsa20poly1305_ref_beforenm(unsigned char *k,
const unsigned char *pk,
const unsigned char *sk)
{
return crypto_box_curve25519xsalsa20poly1305_beforenm(k, pk, sk);
}
#undef crypto_box_curve25519xsalsa20poly1305_ref_afternm
SODIUM_EXPORT int
crypto_box_curve25519xsalsa20poly1305_ref_afternm(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k)
{
return crypto_box_curve25519xsalsa20poly1305_afternm(c, m, mlen, n, k);
}
#undef crypto_box_curve25519xsalsa20poly1305_ref_open_afternm
SODIUM_EXPORT int
crypto_box_curve25519xsalsa20poly1305_ref_open_afternm(unsigned char *m,
const unsigned char *c,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
{
return crypto_box_curve25519xsalsa20poly1305_open_afternm(m, c, clen, n, k);
}
#undef crypto_box_curve25519xsalsa20poly1305_ref
SODIUM_EXPORT int
crypto_box_curve25519xsalsa20poly1305_ref(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
{
return crypto_box_curve25519xsalsa20poly1305(c, m, mlen, n, pk, sk);
}
#undef crypto_box_curve25519xsalsa20poly1305_ref_open
SODIUM_EXPORT int
crypto_box_curve25519xsalsa20poly1305_ref_open(unsigned char *m,
const unsigned char *c,
unsigned long long clen,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
{
return crypto_box_curve25519xsalsa20poly1305_open(m, c, clen, n, pk, sk);
}
#ifdef __cplusplus
}
#endif