aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-06-26 10:55:58 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-06-26 10:55:58 -0700
commit5add8b8d6d27afac9fe46bcee09cd341fb124294 (patch)
tree3026dddcc1a8e797e97d2a9c1c4471dde21302f1 /activesupport
parentf437f1104687e5bb26bf5ce791aee7d9cc0ec62a (diff)
downloadrails-5add8b8d6d27afac9fe46bcee09cd341fb124294.tar.gz
rails-5add8b8d6d27afac9fe46bcee09cd341fb124294.tar.bz2
rails-5add8b8d6d27afac9fe46bcee09cd341fb124294.zip
:nodoc: our SecureRandom patches [ci skip]
These methods shouldn't be added to `SecureRandom`, as they are neither secure nor random. The more appropriate place for this seems to be `Digest`, so we should move them there. (Pull request welcomed!) Marking this `:nodoc:` for now, so we don't accidentally ship it as public API. See https://github.com/rails/rails/pull/15306/files#r13055862 for details.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/securerandom.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/securerandom.rb b/activesupport/lib/active_support/core_ext/securerandom.rb
index fec8f7c0ec..ff1eb52843 100644
--- a/activesupport/lib/active_support/core_ext/securerandom.rb
+++ b/activesupport/lib/active_support/core_ext/securerandom.rb
@@ -1,4 +1,4 @@
-module SecureRandom
+module SecureRandom #:nodoc:
UUID_DNS_NAMESPACE = "k\xA7\xB8\x10\x9D\xAD\x11\xD1\x80\xB4\x00\xC0O\xD40\xC8" #:nodoc:
UUID_URL_NAMESPACE = "k\xA7\xB8\x11\x9D\xAD\x11\xD1\x80\xB4\x00\xC0O\xD40\xC8" #:nodoc:
UUID_OID_NAMESPACE = "k\xA7\xB8\x12\x9D\xAD\x11\xD1\x80\xB4\x00\xC0O\xD40\xC8" #:nodoc:
@@ -10,7 +10,7 @@ module SecureRandom
# ::uuid_from_hash always generates the same UUID for a given name and namespace combination.
#
# See RFC 4122 for details of UUID at: http://www.ietf.org/rfc/rfc4122.txt
- def self.uuid_from_hash(hash_class, uuid_namespace, name)
+ def self.uuid_from_hash(hash_class, uuid_namespace, name) #:nodoc:
if hash_class == Digest::MD5
version = 3
elsif hash_class == Digest::SHA1
@@ -31,12 +31,12 @@ module SecureRandom
end
# Convenience method for ::uuid_from_hash using Digest::MD5.
- def self.uuid_v3(uuid_namespace, name)
+ def self.uuid_v3(uuid_namespace, name) #:nodoc:
self.uuid_from_hash(Digest::MD5, uuid_namespace, name)
end
# Convenience method for ::uuid_from_hash using Digest::SHA1.
- def self.uuid_v5(uuid_namespace, name)
+ def self.uuid_v5(uuid_namespace, name) #:nodoc:
self.uuid_from_hash(Digest::SHA1, uuid_namespace, name)
end