Skip Menu |

This queue is for tickets about the Digest-HMAC CPAN distribution.

Report information
The Basics
Id: 95740
Status: new
Priority: 0/
Queue: Digest-HMAC

People
Owner: Nobody in particular
Requestors: melo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.03
Fixed in: (no value)



Subject: b64digest not working properly
Hi, I expected the following program to print two exact lines, but it doesn't, Digest::HMAC_SHA1 sometimes drops the trailing =. Maybe my expectations are wrong :), but this caused some interoperability's issues with other services that use base64 encoded HMAC SHA1 signatures. The workaround is of course, generate the binary digest and encode it with MIME::Base64 encode_base64. #!/usr/bin/env perl use v5.14; use MIME::Base64; use Digest::HMAC_SHA1; my $hmac; $hmac = Digest::HMAC_SHA1->new('hello'); $hmac->add('world'); say $hmac->b64digest; $hmac = Digest::HMAC_SHA1->new('hello'); $hmac->add('world'); say encode_base64($hmac->digest, ''); Bye,