mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
52ec7cc543
commit
1b8a677b23
1 changed files with 9 additions and 0 deletions
|
@ -42,6 +42,9 @@ module SecureRandom
|
|||
#
|
||||
# The argument n specifies the length of the result string.
|
||||
#
|
||||
# If n is not specified, 16 is assumed.
|
||||
# It may be larger in future.
|
||||
#
|
||||
# If secure random number generator is not available,
|
||||
# NotImplementedError is raised.
|
||||
def self.random_bytes(n=nil)
|
||||
|
@ -79,6 +82,9 @@ module SecureRandom
|
|||
# The argument n specifies the length of the random length.
|
||||
# The length of the result string is twice of n.
|
||||
#
|
||||
# If n is not specified, 16 is assumed.
|
||||
# It may be larger in future.
|
||||
#
|
||||
# If secure random number generator is not available,
|
||||
# NotImplementedError is raised.
|
||||
def self.hex(n=nil)
|
||||
|
@ -90,6 +96,9 @@ module SecureRandom
|
|||
# The argument n specifies the length of the random length.
|
||||
# The length of the result string is about 4/3 of n.
|
||||
#
|
||||
# If n is not specified, 16 is assumed.
|
||||
# It may be larger in future.
|
||||
#
|
||||
# If secure random number generator is not available,
|
||||
# NotImplementedError is raised.
|
||||
def self.base64(n=nil)
|
||||
|
|
Loading…
Add table
Reference in a new issue