Bug#648542: Digest::CRC::b64digest broken/wrong

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Nov 12 19:13:16 UTC 2011


Package: libdigest-crc-perl
Version: 0.17-1

It appears that Digest::CRC::b64digest produces broken/wrong output as
of 0.17.

I think it's encoding the base 10 representation in ASCII of the digest,
rather than encoding the binary value.

The attached perl script demonstrates the problem.  Here's an example of
an invocation, and a demonstration of what i think it's doing:

dkg at pip:~/tmp$ ./b64broken
  dec: 293510564
 phex: 117e9da4
inhex: 117e9da4
 pb64: EX6dpA==
inb64: MjkzNTEwNT
0 dkg at pip:~/tmp$ printf MjkzNTEwNT | base64 -d
2935105base64: invalid input
1 dkg at pip:~/tmp$ printf EX6dpA== | base64 -d | hd
00000000  11 7e 9d a4                                       |.~..|
00000004
0 dkg at pip:~/tmp$ 

i can't make heads or tails of the internal _encode_base64 function,
unfortunately, so i'm not sure what to propose as a fix.

hth,

        --dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: b64broken
Type: text/x-perl
Size: 480 bytes
Desc: demonstrate problems with b64digest
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20111112/ab98d8e9/attachment-0001.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 965 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20111112/ab98d8e9/attachment-0001.pgp>


More information about the pkg-perl-maintainers mailing list