Bug#700617: Digest::HMAC->new () is "incompatible" with Digest::SHA (512)

Ivan Shmakov oneingray at gmail.com
Fri Feb 15 10:37:22 UTC 2013


Package: libdigest-hmac-perl
Version: 1.03+dfsg-1
Tags: patch

	It isn't currently possible to use the Digest::HMAC module's OO
	interface along with the Digest subclasses whose constructors
	require an argument, such as the Digest::SHA class (as provided
	by the libdigest-sha-perl package) or Digest->new () itself.

	The patch MIME'd provides a way for the caller to pass a
	prepared Digest instance, which is then clone ()'d and reset ()
	to produce a “clean” Digest object.

	Examples:

   require Digest::HMAC;
   require Digest::SHA;

   my $hmac
       = Digest::HMAC->new ($key, Digest::SHA->new (256));
   ## check, e. g., [1]
   my $hmac
       = Digest::HMAC->new ($key, Digest::SHA->new (384), 128);
   my $hmac
       = Digest::HMAC->new ($key, Digest::SHA->new (512), 128);

	FWIW, I've tested HMAC-SHA512 by making DNS updates to
	BIND9-hosted zones with Net::DNS.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=313196

-- 
FSF associate member #7257
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-diff
Size: 931 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20130215/99ac3d85/attachment.diff>


More information about the pkg-perl-maintainers mailing list