From 137ae007ae34383a6a7d575689486ce13a7097c6 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 21 Jan 2013 12:35:58 -0800 Subject: [PATCH] Export randombytes helpers --- src/libsodium/include/Makefile.am | 1 + src/libsodium/include/sodium/randombytes.h | 14 +++++++++++--- .../sodium}/salsa20_random.h | 0 3 files changed, 12 insertions(+), 3 deletions(-) rename src/libsodium/{randombytes => include/sodium}/salsa20_random.h (100%) diff --git a/src/libsodium/include/Makefile.am b/src/libsodium/include/Makefile.am index feba912b..84ae0b17 100644 --- a/src/libsodium/include/Makefile.am +++ b/src/libsodium/include/Makefile.am @@ -36,6 +36,7 @@ SODIUM_EXPORT = \ sodium/crypto_verify_16.h \ sodium/crypto_verify_32.h \ sodium/randombytes.h \ + sodium/salsa20_random.h \ sodium/version.h EXTRA_SRC = $(SODIUM_EXPORT) \ diff --git a/src/libsodium/include/sodium/randombytes.h b/src/libsodium/include/sodium/randombytes.h index eee22bed..eb047a6a 100644 --- a/src/libsodium/include/sodium/randombytes.h +++ b/src/libsodium/include/sodium/randombytes.h @@ -1,12 +1,20 @@ -#ifndef randombytes_devurandom_H -#define randombytes_devurandom_H +#ifndef randombytes_salsa20_random_H +#define randombytes_salsa20_random_H + +#include "salsa20_random.h" #ifdef __cplusplus extern "C" { #endif -extern void randombytes(unsigned char *,unsigned long long); +void randombytes(unsigned char *, unsigned long long); + +#define randombytes_random salsa20_random +#define randombytes_stir salsa20_random_stir +#define randombytes_uniform salsa20_random_uniform +#define randombytes_buf salsa20_random_buf +#define randombytes_close salsa20_random_close #ifdef __cplusplus } diff --git a/src/libsodium/randombytes/salsa20_random.h b/src/libsodium/include/sodium/salsa20_random.h similarity index 100% rename from src/libsodium/randombytes/salsa20_random.h rename to src/libsodium/include/sodium/salsa20_random.h