summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-03 15:04:36 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-03 15:04:36 +0000
commite53a62ae34680ce91eab4aa9619d6d100733ecd7 (patch)
tree45182f7651eb59a3b8d06d4f8c1eecfcf8c77a08
parent4cc679728e23bc3b35ed6f746267b854e3dbc7ad (diff)
* ext/digest/lib/digest/hmac.rb: Emit a deprecation warning in
verbose mode and add a caution to the overview section of the document. [ruby-dev:41525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--NEWS16
-rw-r--r--ext/digest/lib/digest/hmac.rb7
3 files changed, 25 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 774cc0a7cd..b6a8c1b8d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jun 3 23:34:55 2010 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/digest/lib/digest/hmac.rb: Emit a deprecation warning in
+ verbose mode and add a caution to the overview section of the
+ document. [ruby-dev:41525]
+
Thu Jun 3 19:33:51 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/cfunc.c (rb_dlcfunc_inspect): suppress warnings by
diff --git a/NEWS b/NEWS
index 819cb5bb90..049346f982 100644
--- a/NEWS
+++ b/NEWS
@@ -191,10 +191,14 @@ with all sufficient information, see the ChangeLog file.
For example, Process.respond_to?(:fork) returns false on Windows.
* digest
- * new methods:
- * Digest::Class.base64digest
- * Digest::Instance#base64digest
- * Digest::Instance#base64digest!
+ * new methods:
+ * Digest::Class.base64digest
+ * Digest::Instance#base64digest
+ * Digest::Instance#base64digest!
+
+ * Digest::HMAC (digest/hmac) has been marked as deprecated because
+ it was unintentional for the experimental library to be included
+ in the final release of 1.9.1. Please use OpenSSL::HMAC instead.
* rss
@@ -455,3 +459,7 @@ with all sufficient information, see the ChangeLog file.
* $:
See above.
+
+ * Digest::HMAC
+
+ Deprecated. See above.
diff --git a/ext/digest/lib/digest/hmac.rb b/ext/digest/lib/digest/hmac.rb
index 1948352c4b..98f98a69cf 100644
--- a/ext/digest/lib/digest/hmac.rb
+++ b/ext/digest/lib/digest/hmac.rb
@@ -4,6 +4,11 @@
#
# == Overview
#
+# CAUTION: Use of this library is discouraged, because this
+# implementation was meant to be experimental but somehow got into the
+# 1.9 series without being noticed. Please use OpenSSL::HMAC in the
+# "openssl" library instead.
+#
# This library adds a method named hmac() to Digest classes, which
# creates a Digest class for calculating HMAC digests.
#
@@ -36,6 +41,8 @@
# $Id$
#
+warn "use of the experimetal library 'digest/hmac' is discouraged; require 'openssl' and use OpenSSL::HMAC instead." if $VERBOSE
+
require 'digest'
module Digest