Your message dated Sun, 13 Nov 2011 15:06:18 +0000
with message-id <[email protected]>
and subject line Bug#648546: fixed in libdigest-crc-perl 0.18-1
has caused the Debian Bug report #648546,
regarding add OpenPGP ASCII armor checksum to Digest::CRC
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
648546: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648546
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libdigest-crc-perl
Version: 0.17-1
Severity: wishlist
Tags: patch upstream

One common CRC used on the 'net today is the radix-64 armor checksum
specified in the OpenPGP standard:

 https://tools.ietf.org/html/rfc4880#section-6

This is already possible to implement with Digest::CRC using the
following object:

my $ctx = Digest::CRC->new(width => 24, init=> 0xB704CE,
                           xorout => 0x000000, refout => 0,
                           poly => 0x864CFB, refin => 0,
                           cont => 1);

But this is kind of bulky and inconvenient to use.

The attached patch enhances Digest::CRC by adding a crcopenpgparmor
type, and exporting a function of the same name.  It should apply to
version 0.17 of Digest::CRC.

I'd be happy to have this patch included upstream, and release it under
the same terms as the upstream source.

Thanks for Digest::CRC, it's very much appreciated.

Regards,

        --dkg

--- lib/Digest/CRC.pm	2011-11-12 14:47:51.000000000 -0500
+++ /usr/lib/perl5/Digest/CRC.pm	2011-11-12 14:32:31.000000000 -0500
@@ -8,11 +8,12 @@
 @ISA = qw(Exporter);
 
 @EXPORT_OK = qw(
- crc8 crcccitt crc16 crc32 crc64 crc
+ crc8 crcccitt crc16 crcopenpgparmor crc32 crc64 crc
  crc_hex crc_base64
  crcccitt_hex crcccitt_base64
  crc8_hex crc8_base64
  crc16_hex crc16_base64
+ crcopenpgparmor_hex crcopenpgparmor_base64
  crc32_hex crc32_base64
  crc64_hex crc64_base64
 );
@@ -126,6 +127,7 @@
   crc8 => [8,0,0,0,0x07,0,0],
   crcccitt => [16,0xffff,0,0,0x1021,0,0],
   crc16 => [16,0,0,1,0x8005,1,0],
+  crcopenpgparmor => [24,0xB704CE,0,0,0x864CFB,0,0],
   crc32 => [32,0xffffffff,0xffffffff,1,0x04C11DB7,1,0],
 );
 
@@ -273,6 +275,12 @@
 
 sub crc16 { crc($_[0],@{$_typedef{crc16}}) }
 
+# CRC-24 for OpenPGP ASCII Armor checksum
+# https://tools.ietf.org/html/rfc4880#section-6
+# poly: 0x864CFB, width: 24, init: 0xB704CE, refin: no, refout: no, xorout: no
+
+sub crcopenpgparmor { crc($_[0],@{$_typedef{crcopenpgparmor}}) }
+
 # CRC32
 # poly: 04C11DB7, width: 32, init: FFFFFFFF, revin: yes, revout: yes,
 # xorout: FFFFFFFF
@@ -301,6 +309,10 @@
 
 sub crc16_base64 { _encode_base64 &crc16 }
 
+sub crcopenpgparmor_hex { _encode_hex &crcopenpgparmor }
+
+sub crcopenpgparmor_base64 { _encode_base64 &crcopenpgparmor }
+
 sub crc32_hex { _encode_hex &crc32 }
 
 sub crc32_base64 { _encode_base64 &crc32 }
@@ -320,12 +332,13 @@
 
   # Functional style
 
-  use Digest::CRC qw(crc64 crc32 crc16 crcccitt crc crc8);
+  use Digest::CRC qw(crc64 crc32 crc16 crcccitt crc crc8 crcopenpgparmor);
   $crc = crc64("123456789");
   $crc = crc32("123456789");
   $crc = crc16("123456789");
   $crc = crcccitt("123456789");
   $crc = crc8("123456789");
+  $crc = crcopenpgparmor("123456789");
 
   $crc = crc($input,$width,$init,$xorout,$refout,$poly,$refin,$cont);
 
@@ -348,7 +361,12 @@
 
 The B<Digest::CRC> module calculates CRC sums of all sorts.
 It contains wrapper functions with the correct parameters for CRC-CCITT,
-CRC-16, CRC-32 and CRC-64.
+CRC-16, CRC-32 and CRC-64, as well as the CRC used in OpenPGP's
+ASCII-armored checksum.
+
+=head1 SEE ALSO
+
+https://tools.ietf.org/html/rfc4880#section-6
 
 =head1 AUTHOR
 

Attachment: pgpV61tp4tAPL.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: libdigest-crc-perl
Source-Version: 0.18-1

We believe that the bug you reported is fixed in the latest version of
libdigest-crc-perl, which is due to be installed in the Debian FTP archive:

libdigest-crc-perl_0.18-1.debian.tar.gz
  to main/libd/libdigest-crc-perl/libdigest-crc-perl_0.18-1.debian.tar.gz
libdigest-crc-perl_0.18-1.dsc
  to main/libd/libdigest-crc-perl/libdigest-crc-perl_0.18-1.dsc
libdigest-crc-perl_0.18-1_i386.deb
  to main/libd/libdigest-crc-perl/libdigest-crc-perl_0.18-1_i386.deb
libdigest-crc-perl_0.18.orig.tar.gz
  to main/libd/libdigest-crc-perl/libdigest-crc-perl_0.18.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alessandro Ghedini <[email protected]> (supplier of updated libdigest-crc-perl 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 13 Nov 2011 14:31:31 +0100
Source: libdigest-crc-perl
Binary: libdigest-crc-perl
Architecture: source i386
Version: 0.18-1
Distribution: unstable
Urgency: low
Maintainer: Debian Perl Group <[email protected]>
Changed-By: Alessandro Ghedini <[email protected]>
Description: 
 libdigest-crc-perl - Perl module providing generic CRC functions
Closes: 648542 648546
Changes: 
 libdigest-crc-perl (0.18-1) unstable; urgency=low
 .
   * Team upload
   * New upstream release
     - Added openpgparmor support (Closes: #648546)
     - Fixed few issues in xs code (Closes: #648542)
Checksums-Sha1: 
 a471384e9359836ea70499354ba35d07300c7d14 2154 libdigest-crc-perl_0.18-1.dsc
 8289a1ebaa0e2e022635e83bb37dc7c2b32c9dd5 7721 
libdigest-crc-perl_0.18.orig.tar.gz
 76d4586e71b9153c9f4330e5d927fce462558b6c 3005 
libdigest-crc-perl_0.18-1.debian.tar.gz
 3a6ac31ff15560557d29b1e068356fbdeece7055 16486 
libdigest-crc-perl_0.18-1_i386.deb
Checksums-Sha256: 
 cc2493162f45c525633a024a765f9848828606e6ee4fbbe3b895522fdaa53805 2154 
libdigest-crc-perl_0.18-1.dsc
 5c5329f37c46eb79835169508583da8767d9839350b69bb2b48ac6f594f70374 7721 
libdigest-crc-perl_0.18.orig.tar.gz
 3d2117617e03a3dfb88655384b25eafe0713e582207285ce5faad1c670a471c6 3005 
libdigest-crc-perl_0.18-1.debian.tar.gz
 1117768c4277d35cd171009f12bf7842627fc2962cfa99fe036453edac03601f 16486 
libdigest-crc-perl_0.18-1_i386.deb
Files: 
 90a19b29979f1b7d89f897df0c2d931f 2154 perl optional 
libdigest-crc-perl_0.18-1.dsc
 baf8cb6c50782416b10f470b2e29bf7a 7721 perl optional 
libdigest-crc-perl_0.18.orig.tar.gz
 95076cca3764eacfbe520976bd2354e0 3005 perl optional 
libdigest-crc-perl_0.18-1.debian.tar.gz
 297bdefa0a104e328033cf0fc0f709ff 16486 perl optional 
libdigest-crc-perl_0.18-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOv9sYAAoJELs6aAGGSaoGjqwP/iYkhxWM/uE7l3LtIhCiBcqw
9nYp+NDeitVFLM19krccmrC1jUcoBxhi1cB+lBxcfjLaY+7agJVpm7yZIUXT2kru
mwY2oBQ4FRYPlQRBGw4YSHm4Dox2wa+tAXraaDTh4Vn0P8rIJE3xkjKOmLJNqHq5
1f0IkcMwKyftbySIpe2DjwMFKG06r71JBjWUytE80c0apFtan9+BRQqZzM4M985v
9xIqQ3MBYpAE8l9C52vYjb6n61VAQTlDbfwSEEEQTREF5+y9g6HKQE3rpX02oC4Z
2SsRLJJ9ulbbTZKGy1EcGPte7NI1nl47kAx8OkSTNfjlI3DMvXC9n4qUN041IYBZ
NbIh6KlKNduxZHeGSH6xDQhlRxRtBe5VbkNNnQ/L61HUI2ec8G4gBlnFEIyLD8pL
CRHv6833NmMLDQwWsreMRnKldr8HKd44ZfTz2RKAFHFrM18Yaw1UNaSd0Lo9wvRn
ICqllG313hyaPA1A9wMF8Bk6R6QfACCQNdremYTDRE5O4qwvlVKYJnmI/GumDPZF
Vgc1ROYNEaMtfSXMplm+noyhH+WBg/l558vqYTBQLAQqCzezQkQ6O60IRrTY+0KT
p9irJIgtNpttWz1B5bT+ly8mENxuO6yl8KKQC9qOu85vjqgI97TdSVRLm3JZAshr
VAdQ+bscIUY4YTElHQr7
=8ugs
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to