# File src/ISAAC.rb, line 18 def initialize @mm = [] @randrsl = [] # Best initialization of the generator would be by pulling # numbers from /dev/random. if (FileTest.exist? '/dev/urandom') File.open('/dev/urandom','r') do |r| 256.times do |t| z = r.read(4) x = z.unpack('V')[0] @randrsl[t] = x end end else # If urandom isn't available, the standard Ruby PRNG makes an # adequate fallback. 256.times do |t| @randrsl[t] = Kernel.rand(2147483647) end end randinit(true) nil end