c++ - Generating Random Numbers Within a Specified Range Using Crypto++ -


how generate random numbers within specified range using crypto++ autoseededrandompool random number generator.

how generate random numbers within specified range ...

use integer, multi-precision. contructor of interest:

integer (randomnumbergenerator &rng, const integer &min, const integer &max,          randomnumbertype rntype=any, const integer &equiv=zero(), const integer &mod=one()) 

see integer class reference details.


... using crypto++ autoseededrandompool

autoseededrandompool derived randomnumbergenerator, able use it.

see autoseededrandompool class reference details.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -