mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
crypto_stream macros -> functions
This commit is contained in:
@@ -118,6 +118,7 @@ libsodium_la_SOURCES = \
|
||||
crypto_sign/edwards25519sha512batch/ref/sc25519.h \
|
||||
crypto_sign/edwards25519sha512batch/ref/sc25519_edwards25519sha512batch.c \
|
||||
crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c \
|
||||
crypto_stream/crypto_stream.c \
|
||||
crypto_stream/aes128ctr/portable/afternm_aes128ctr.c \
|
||||
crypto_stream/aes128ctr/portable/api.h \
|
||||
crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c \
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#include "crypto_stream.h"
|
||||
|
||||
int
|
||||
crypto_stream(unsigned char *c, unsigned long long clen,
|
||||
const unsigned char *n, const unsigned char *k)
|
||||
{
|
||||
return crypto_stream_xsalsa20(c, clen, n, k);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
crypto_stream_xor(unsigned char *c, const unsigned char *m,
|
||||
unsigned long long mlen, const unsigned char *n,
|
||||
const unsigned char *k)
|
||||
{
|
||||
return crypto_stream_xsalsa20_xor(c, m, mlen, n, k);
|
||||
}
|
||||
@@ -3,13 +3,16 @@
|
||||
|
||||
#include "crypto_stream_xsalsa20.h"
|
||||
|
||||
#define crypto_stream crypto_stream_xsalsa20
|
||||
#define crypto_stream_xor crypto_stream_xsalsa20_xor
|
||||
#define crypto_stream_beforenm crypto_stream_xsalsa20_beforenm
|
||||
#define crypto_stream_afternm crypto_stream_xsalsa20_afternm
|
||||
#define crypto_stream_xor_afternm crypto_stream_xsalsa20_xor_afternm
|
||||
#define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES
|
||||
#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES
|
||||
#define crypto_stream_PRIMITIVE "xsalsa20"
|
||||
|
||||
int crypto_stream(unsigned char *c, unsigned long long clen,
|
||||
const unsigned char *n, const unsigned char *k);
|
||||
|
||||
|
||||
int crypto_stream_xor(unsigned char *c, const unsigned char *m,
|
||||
unsigned long long mlen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user