Project

General

Profile

Bug #6928 ยป securerandom.patch

MartinBosslet (Martin Bosslet), 08/26/2012 01:58 AM

View differences:

lib/securerandom.rb (working copy)
if @pid != pid
now = Time.now
ary = [now.to_i, now.nsec, @pid, pid]
OpenSSL::Random.seed(ary.to_s)
OpenSSL::Random.random_add(ary.to_s, 0.0)
@pid = pid
end
return OpenSSL::Random.random_bytes(n)
    (1-1/1)