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

#700617#5
Date:
2013-02-15 10:37:22 UTC
From:
To:
	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