зеркало из https://github.com/github/ruby.git
Add a note to Random.urandom
The method may return nil for some reasons. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
86d76173de
Коммит
7451ec065c
4
random.c
4
random.c
|
@ -606,8 +606,10 @@ random_seed(void)
|
|||
* call-seq: Random.urandom(size) -> string
|
||||
*
|
||||
* Returns a string, using platform providing features.
|
||||
* Returned value expected to be a cryptographically secure
|
||||
* Returned value is expected to be a cryptographically secure
|
||||
* pseudo-random number in binary form.
|
||||
* This method returns nil if the feature provided by platform
|
||||
* failed to prepare the result.
|
||||
*
|
||||
* In 2017, Linux manpage random(7) writes that "no cryptographic
|
||||
* primitive available today can hope to promise more than 256 bits of
|
||||
|
|
Загрузка…
Ссылка в новой задаче