[前][次][番号順一覧][スレッド一覧]

ruby-changes:47687

From: mame <ko1@a...>
Date: Sun, 10 Sep 2017 00:19:24 +0900 (JST)
Subject: [ruby-changes:47687] mame:r59803 (trunk): Add a note to Random.urandom

mame	2017-09-10 00:19:19 +0900 (Sun, 10 Sep 2017)

  New Revision: 59803

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59803

  Log:
    Add a note to Random.urandom
    
    The method may return nil for some reasons.

  Modified files:
    trunk/random.c
Index: random.c
===================================================================
--- random.c	(revision 59802)
+++ random.c	(revision 59803)
@@ -606,8 +606,10 @@ random_seed(void) https://github.com/ruby/ruby/blob/trunk/random.c#L606
  * 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]