And finally, wrap crypto_stream macros

This commit is contained in:
Frank Denis
2013-04-21 17:32:10 -07:00
parent 765cad9146
commit f44c1e477f
2 changed files with 29 additions and 4 deletions
@@ -1,6 +1,24 @@
#include "crypto_stream.h"
size_t
crypto_stream_keybytes(void)
{
return crypto_stream_KEYBYTES;
}
size_t
crypto_stream_noncebytes(void)
{
return crypto_stream_NONCEBYTES;
}
const char *
crypto_stream_primitive(void)
{
return crypto_stream_PRIMITIVE;
}
int
crypto_stream(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k)
+11 -4
View File
@@ -1,16 +1,23 @@
#ifndef crypto_stream_H
#define crypto_stream_H
#include "crypto_stream_xsalsa20.h"
#include <stdlib.h>
#define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES
#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES
#define crypto_stream_PRIMITIVE "xsalsa20"
#include "crypto_stream_xsalsa20.h"
#ifdef __cplusplus
extern "C" {
#endif
#define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES
size_t crypto_stream_keybytes(void);
#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES
size_t crypto_stream_noncebytes(void);
#define crypto_stream_PRIMITIVE "xsalsa20"
const char *crypto_stream_primitive(void);
int crypto_stream(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);