crypto_box_curve25519xsalsa20poly1305_ref compat
This commit is contained in:
parent
cb7c294cb8
commit
393aa1a229
@ -11,7 +11,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
int crypto_sign_ed25519(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
int crypto_sign_ed25519(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
#include "crypto_auth_hmacsha512256.h"
|
#include "crypto_auth_hmacsha512256.h"
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef crypto_auth_hmacsha256_ref
|
#undef crypto_auth_hmacsha256_ref
|
||||||
SODIUM_EXPORT int
|
SODIUM_EXPORT int
|
||||||
crypto_auth_hmacsha256_ref(unsigned char *out, const unsigned char *in,
|
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);
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user