BigDigits  2.6.1
Functions
bigdigitsRand.h File Reference

Interface for BigDigits "mp" random number functions using a "pretty-good" internal RNG. More...

Functions

size_t mpRandomBits (DIGIT_T a[], size_t ndigits, size_t nbits)
 Generate a random mp number of bit length at most nbits using internal RNG. More...
 
int mpRandomOctets (unsigned char *bytes, size_t nbytes, const unsigned char *seed, size_t seedlen)
 Generate array of random octets (bytes) using internal RNG. More...
 
DIGIT_T spBetterRand (void)
 Returns a "better" pseudo-random digit using internal RNG. More...
 

Detailed Description

Interface for BigDigits "mp" random number functions using a "pretty-good" internal RNG.

Function Documentation

size_t mpRandomBits ( DIGIT_T  a[],
size_t  ndigits,
size_t  nbits 
)

Generate a random mp number of bit length at most nbits using internal RNG.

Parameters
[out]ato receive generated random number
[in]ndigitsnumber of digits in a
[in]nbitsmaximum number of bits
Returns
Number of digits actually set
int mpRandomOctets ( unsigned char *  bytes,
size_t  nbytes,
const unsigned char *  seed,
size_t  seedlen 
)

Generate array of random octets (bytes) using internal RNG.

Remarks
This function is in the correct form for BD_RANDFUNC to use in bdRandomSeeded(). seed is ignored.
DIGIT_T spBetterRand ( void  )

Returns a "better" pseudo-random digit using internal RNG.

Copyright © 2001-16 D.I. Management Services Pty Limited ABN 78 083 210 584 Australia. All rights reserved. <www.di-mgt.com.au/bigdigits.html> Generated on Thu Mar 31 2016 10:28:02 by Doxygen 1.8.3.1.