Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/testrand.h
/********************************************************************** | /********************************************************************** | ||||
* Copyright (c) 2013, 2014 Pieter Wuille * | * Copyright (c) 2013, 2014 Pieter Wuille * | ||||
* Distributed under the MIT software license, see the accompanying * | * Distributed under the MIT software license, see the accompanying * | ||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* | ||||
**********************************************************************/ | **********************************************************************/ | ||||
#ifndef _SECP256K1_TESTRAND_H_ | #ifndef SECP256K1_TESTRAND_H | ||||
#define _SECP256K1_TESTRAND_H_ | #define SECP256K1_TESTRAND_H | ||||
#if defined HAVE_CONFIG_H | #if defined HAVE_CONFIG_H | ||||
#include "libsecp256k1-config.h" | #include "libsecp256k1-config.h" | ||||
#endif | #endif | ||||
/* A non-cryptographic RNG used only for test infrastructure. */ | /* A non-cryptographic RNG used only for test infrastructure. */ | ||||
/** Seed the pseudorandom number generator for testing. */ | /** Seed the pseudorandom number generator for testing. */ | ||||
Show All 13 Lines | |||||
static void secp256k1_rand256(unsigned char *b32); | static void secp256k1_rand256(unsigned char *b32); | ||||
/** Generate a pseudorandom 32-byte array with long sequences of zero and one bits. */ | /** Generate a pseudorandom 32-byte array with long sequences of zero and one bits. */ | ||||
static void secp256k1_rand256_test(unsigned char *b32); | static void secp256k1_rand256_test(unsigned char *b32); | ||||
/** Generate pseudorandom bytes with long sequences of zero and one bits. */ | /** Generate pseudorandom bytes with long sequences of zero and one bits. */ | ||||
static void secp256k1_rand_bytes_test(unsigned char *bytes, size_t len); | static void secp256k1_rand_bytes_test(unsigned char *bytes, size_t len); | ||||
#endif | #endif /* SECP256K1_TESTRAND_H */ |