mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/securerandom.rb: call OpenSSL::Random.seed at the
SecureRandom.random_bytes call. based on the patch by Masahiro Tomita. [ruby-dev:44270] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d93746490d
commit
31eb19bbb6
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Jul 29 23:56:32 2011 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* lib/securerandom.rb: call OpenSSL::Random.seed at the
|
||||||
|
SecureRandom.random_bytes call.
|
||||||
|
based on the patch by Masahiro Tomita. [ruby-dev:44270]
|
||||||
|
|
||||||
Fri Jul 29 23:53:48 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Jul 29 23:53:48 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_set_len): new function to set array length.
|
* array.c (rb_ary_set_len): new function to set array length.
|
||||||
|
|
|
@ -57,7 +57,7 @@ module SecureRandom
|
||||||
n ||= 16
|
n ||= 16
|
||||||
|
|
||||||
if defined? OpenSSL::Random
|
if defined? OpenSSL::Random
|
||||||
@pid = $$ if !defined?(@pid)
|
@pid = 0 if !defined?(@pid)
|
||||||
pid = $$
|
pid = $$
|
||||||
if @pid != pid
|
if @pid != pid
|
||||||
now = Time.now
|
now = Time.now
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue