mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
And finally, wrap crypto_stream macros
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user