Security Scol plugin
Classes | Typedefs
mersenne.h File Reference

Class file for Mersenne Twister. More...

#include "cryptlib.h"
#include "secblock.h"
#include "misc.h"

Go to the source code of this file.

Classes

class  MersenneTwister< K, M, N, F, S >
 Mersenne Twister class for Monte-Carlo simulations. More...
 

Typedefs

typedef MersenneTwister< 0x9908B0DF, 397, 624, 0x10DCD, 4537 > MT19937
 Original MT19937 generator provided in the ACM paper.
 
typedef MersenneTwister< 0x9908B0DF, 397, 624, 0x6C078965, 5489 > MT19937ar
 Updated MT19937 generator adapted to provide an array for initialization.
 

Detailed Description

Class file for Mersenne Twister.

Warning
MersenneTwister is suitable for Monte-Carlo simulations, where uniformaly distributed numbers are required quickly. It should not be used for cryptographic purposes.
Since
Crypto++ 5.6.3

Definition in file mersenne.h.

Typedef Documentation

◆ MT19937

typedef MersenneTwister<0x9908B0DF , 397, 624, 0x10DCD , 4537> MT19937

Original MT19937 generator provided in the ACM paper.

MT19937 uses 4537 as default initial seed.

You should reseed the generator after a fork() to avoid multiple generators with the same internal state.

See also
MT19937ar, Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator
Since
Crypto++ 5.6.3

Definition at line 212 of file mersenne.h.

◆ MT19937ar

typedef MersenneTwister<0x9908B0DF , 397, 624, 0x6C078965 , 5489> MT19937ar

Updated MT19937 generator adapted to provide an array for initialization.

MT19937 uses 5489 as default initial seed. Use this generator when interoperating with C++11's mt19937 class.

You should reseed the generator after a fork() to avoid multiple generators with the same internal state.

See also
MT19937, Mersenne Twister with improved initialization
Since
Crypto++ 5.6.3

Definition at line 226 of file mersenne.h.