mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-29 01:18:55 +00:00
bf9710fd5a
This only affects build_android, if nacl-gcc-prep is run then build/`uname -s` will be created.
28 lines
618 B
C
28 lines
618 B
C
#include "crypto_box.h"
|
|
|
|
int crypto_box(
|
|
unsigned char *c,
|
|
const unsigned char *m,unsigned long long mlen,
|
|
const unsigned char *n,
|
|
const unsigned char *pk,
|
|
const unsigned char *sk
|
|
)
|
|
{
|
|
unsigned char k[crypto_box_BEFORENMBYTES];
|
|
crypto_box_beforenm(k,pk,sk);
|
|
return crypto_box_afternm(c,m,mlen,n,k);
|
|
}
|
|
|
|
int crypto_box_open(
|
|
unsigned char *m,
|
|
const unsigned char *c,unsigned long long clen,
|
|
const unsigned char *n,
|
|
const unsigned char *pk,
|
|
const unsigned char *sk
|
|
)
|
|
{
|
|
unsigned char k[crypto_box_BEFORENMBYTES];
|
|
crypto_box_beforenm(k,pk,sk);
|
|
return crypto_box_open_afternm(m,c,clen,n,k);
|
|
}
|