Class Crypt::ISAAC
In: src/ISAAC.rb
Parent: Object

ISAAC is a fast, strong random number generator. Details on the algorithm can be found here: burtleburtle.net/bob/rand/isaac.html This provides a consistent and capable algorithm for producing independent streams of quality random numbers.

Methods

isaac   new   rand   randinit  

Attributes

aa  [RW] 
bb  [RW] 
cc  [RW] 
mm  [RW] 
randcnt  [RW] 
randrsl  [RW] 

Public Class methods

When a Crypt::ISAAC object is created, it needs to be seeded for random number generation. If the system has a /dev/urandom file, that will be used to do the seeding. If it does not, the system will fall back to a simplistic initialization mechanism.

Public Instance methods

Works just like the standard rand() function. If called with an integer argument, rand() will return positive random number in the range of 0 to (argument - 1). If called without an integer argument, rand() returns a positive floating point number less than 1.

[Validate]