1 // Copyright (c) 2013 Pieter Wuille
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef _SECP256K1_TESTRAND_H_
6 #define _SECP256K1_TESTRAND_H_
8 #if defined HAVE_CONFIG_H
9 #include "libsecp256k1-config.h"
12 /** Seed the pseudorandom number generator. */
13 SECP256K1_INLINE static void secp256k1_rand_seed(uint64_t v);
15 /** Generate a pseudorandom 32-bit number. */
16 static uint32_t secp256k1_rand32(void);
18 /** Generate a pseudorandom 32-byte array. */
19 static void secp256k1_rand256(unsigned char *b32);
21 /** Generate a pseudorandom 32-byte array with long sequences of zero and one bits. */
22 static void secp256k1_rand256_test(unsigned char *b32);