mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/securerandom.rb: [DOC] Add note on require for examples
Based on a patch by @schneems [Fixes GH-518] [ci skip] https://github.com/ruby/ruby/pull/518 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e4ee9897d4
commit
09c3f84566
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Sat Feb 1 06:10:49 2014 Zachary Scott <e@zzak.io>
|
||||
|
||||
* lib/securerandom.rb: [DOC] Add note on require for examples
|
||||
Based on a patch by @schneems [Fixes GH-518] [ci skip]
|
||||
https://github.com/ruby/ruby/pull/518
|
||||
|
||||
Sat Feb 1 06:04:56 2014 Zachary Scott <e@zzak.io>
|
||||
|
||||
* numeric.c: [DOC] Fix typo in example for #step [ci skip]
|
||||
|
|
|
@ -8,6 +8,10 @@ end
|
|||
# This library is an interface for secure random number generator which is
|
||||
# suitable for generating session key in HTTP cookies, etc.
|
||||
#
|
||||
# You can use this library in your application by requiring it:
|
||||
#
|
||||
# require 'securerandom'
|
||||
#
|
||||
# It supports following secure random number generators.
|
||||
#
|
||||
# * openssl
|
||||
|
@ -18,6 +22,8 @@ end
|
|||
#
|
||||
# Hexadecimal string.
|
||||
#
|
||||
# require 'securerandom'
|
||||
#
|
||||
# p SecureRandom.hex(10) #=> "52750b30ffbc7de3b362"
|
||||
# p SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559"
|
||||
# p SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23"
|
||||
|
|
Loading…
Reference in a new issue