aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-03 14:48:23 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-03 14:48:23 +0000
commit24be1f14e65e567acb4f68addec7d5e481342378 (patch)
tree4f8cfb63626862ba0d7220a88f311cf2daa6f0cd
parent8984ef470547d0cb510a8937ae4b4f878f9eaba6 (diff)
downloadruby-24be1f14e65e567acb4f68addec7d5e481342378.tar.gz
* 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/trunk@28149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/digest/lib/digest/hmac.rb7
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 07bebece41..59c8b54e23 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/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