5 Commits

Author SHA1 Message Date
Pieter Wuille
251b1a62d3 Improve testrand: add extra random functions
This commit adds functions:
* secp256k1_rand_bits, which works like secp256k1_rand32, but consumes
  less randomness
* secp256k1_rand_int, which produces a uniform integer over any range
* secp256k1_rand_bytes_test, which works like secp256k1_rand256_test
  but for arbitrary byte array
2015-10-21 16:13:37 +02:00
Pieter Wuille
8956111802 use 128-bit hex seed 2015-02-23 07:32:37 -08:00
Gregory Maxwell
34b898dc84 Additional comments for the testing PRNG and a seeding fix.
Rw has additional short-cycle inputs because 2^32/0x464fffff >= 2.
2015-02-07 00:22:49 +00:00
Gregory Maxwell
71712b27e5 Switch to C89 comments in prep for making the whole codebase C89 compatible.
This should be whitespace/comment only changes and should produce the same
object code.
2014-11-15 07:33:07 -08:00
Gregory Maxwell
f0709ac57e Avoid forward static decl of undefined functions, also fix a paren warning in the tests. 2014-11-13 01:45:49 -08:00