r71028 - in /branches/upstream/libdigest-sha-perl/current: Changes META.yml README SHA.xs lib/Digest/SHA.pm shasum src/hmac.c src/hmac.h src/sha.c src/sha.h src/sha64bit.c src/sha64bit.h

carnil at users.alioth.debian.org carnil at users.alioth.debian.org
Thu Mar 10 07:16:50 UTC 2011


Author: carnil
Date: Thu Mar 10 07:16:42 2011
New Revision: 71028

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71028
Log:
[svn-upgrade] new version libdigest-sha-perl (5.61)

Modified:
    branches/upstream/libdigest-sha-perl/current/Changes
    branches/upstream/libdigest-sha-perl/current/META.yml
    branches/upstream/libdigest-sha-perl/current/README
    branches/upstream/libdigest-sha-perl/current/SHA.xs
    branches/upstream/libdigest-sha-perl/current/lib/Digest/SHA.pm
    branches/upstream/libdigest-sha-perl/current/shasum
    branches/upstream/libdigest-sha-perl/current/src/hmac.c
    branches/upstream/libdigest-sha-perl/current/src/hmac.h
    branches/upstream/libdigest-sha-perl/current/src/sha.c
    branches/upstream/libdigest-sha-perl/current/src/sha.h
    branches/upstream/libdigest-sha-perl/current/src/sha64bit.c
    branches/upstream/libdigest-sha-perl/current/src/sha64bit.h

Modified: branches/upstream/libdigest-sha-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/Changes?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/Changes (original)
+++ branches/upstream/libdigest-sha-perl/current/Changes Thu Mar 10 07:16:42 2011
@@ -1,4 +1,11 @@
 Revision history for Perl extension Digest::SHA.
+
+5.61  Wed Mar  9 05:26:36 MST 2011
+	- corrected bug in 'algorithm' method
+	- fixed -x option in Makefile.PL
+		-- not often used since it deliberately excludes
+			all 64-bit SHA transforms
+	- addressed minor documentation oversights
 
 5.60  Thu Mar  3 05:26:42 MST 2011
 	- added new SHA-512/224 and SHA-512/256 transforms

Modified: branches/upstream/libdigest-sha-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/META.yml?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/META.yml (original)
+++ branches/upstream/libdigest-sha-perl/current/META.yml Thu Mar 10 07:16:42 2011
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name: Digest-SHA
-version: 5.60
+version: 5.61
 abstract: Perl extension for SHA-1/224/256/384/512
 license: perl
 author:
@@ -10,7 +10,7 @@
 provides:
   Digest::SHA:
     file: lib/Digest/SHA.pm
-    version: 5.60
+    version: 5.61
 meta-spec:
   version: 1.3
   url: http://module-build.sourceforge.net/META-spec-v1.3.html

Modified: branches/upstream/libdigest-sha-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/README?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/README (original)
+++ branches/upstream/libdigest-sha-perl/current/README Thu Mar 10 07:16:42 2011
@@ -1,11 +1,11 @@
-Digest::SHA version 5.60
+Digest::SHA version 5.61
 ========================
 
 Digest::SHA is a complete implementation of the NIST Secure Hash
 Standard.  It gives Perl programmers a convenient way to calculate
-SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 message digests.
-The module can handle all types of input, including partial-byte
-data.
+SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256
+message digests.  The module can handle all types of input, including
+partial-byte data.
 
 Digest::SHA is written in C for speed.  If your platform lacks a
 C compiler, you can install the functionally-equivalent (but much

Modified: branches/upstream/libdigest-sha-perl/current/SHA.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/SHA.xs?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/SHA.xs (original)
+++ branches/upstream/libdigest-sha-perl/current/SHA.xs Thu Mar 10 07:16:42 2011
@@ -166,9 +166,7 @@
 	int result;
 PPCODE:
 	state = INT2PTR(SHA *, SvIV(SvRV(SvRV(self))));
-	result = shadsize(state) << 3;
-	if (ix == 1 && result == 160)
-		result = 1;
+	result = ix ? shaalg(state) : shadsize(state) << 3;
 	ST(0) = sv_2mortal(newSViv(result));
 	XSRETURN(1);
 

Modified: branches/upstream/libdigest-sha-perl/current/lib/Digest/SHA.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/lib/Digest/SHA.pm?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/lib/Digest/SHA.pm (original)
+++ branches/upstream/libdigest-sha-perl/current/lib/Digest/SHA.pm Thu Mar 10 07:16:42 2011
@@ -7,7 +7,7 @@
 use Fcntl;
 use integer;
 
-$VERSION = '5.60';
+$VERSION = '5.61';
 
 require Exporter;
 require DynaLoader;
@@ -430,10 +430,11 @@
 
 =item B<new($alg)>
 
-Returns a new Digest::SHA object.  Allowed values for I<$alg> are
-1, 224, 256, 384, or 512.  It's also possible to use common string
-representations of the algorithm (e.g. "sha256", "SHA-384").  If
-the argument is missing, SHA-1 will be used by default.
+Returns a new Digest::SHA object.  Allowed values for I<$alg> are 1,
+224, 256, 384, 512, 512224, or 512256.  It's also possible to use
+common string representations of the algorithm (e.g. "sha256",
+"SHA-384").  If the argument is missing, SHA-1 will be used by
+default.
 
 Invoking I<new> as an instance method will not create a new object;
 instead, it will simply reset the object to the initial state
@@ -448,14 +449,14 @@
 =item B<hashsize>
 
 Returns the number of digest bits for this object.  The values are
-160, 224, 256, 384, and 512 for SHA-1, SHA-224, SHA-256, SHA-384,
-and SHA-512, respectively.
+160, 224, 256, 384, 512, 224, and 256 for SHA-1, SHA-224, SHA-256,
+SHA-384, SHA-512, SHA-512/224 and SHA-512/256, respectively.
 
 =item B<algorithm>
 
 Returns the digest algorithm for this object.  The values are 1,
-224, 256, 384, and 512 for SHA-1, SHA-224, SHA-256, SHA-384, and
-SHA-512, respectively.
+224, 256, 384, 512, 512224, and 512256 for SHA-1, SHA-224, SHA-256,
+SHA-384, SHA-512, SHA-512/224, and SHA-512/256, respectively.
 
 =item B<clone>
 

Modified: branches/upstream/libdigest-sha-perl/current/shasum
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/shasum?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/shasum (original)
+++ branches/upstream/libdigest-sha-perl/current/shasum Thu Mar 10 07:16:42 2011
@@ -4,8 +4,8 @@
 	##
 	## Copyright (C) 2003-2011 Mark Shelor, All Rights Reserved
 	##
-	## Version: 5.60
-	## Thu Mar  3 05:26:42 MST 2011
+	## Version: 5.61
+	## Wed Mar  9 05:26:36 MST 2011
 
 	## shasum SYNOPSIS adapted from GNU Coreutils sha1sum.
 	## Include an "-a" option for algorithm selection, and a
@@ -85,7 +85,7 @@
 use Fcntl;
 use Getopt::Long;
 
-my $VERSION = "5.60";
+my $VERSION = "5.61";
 
 
 	## Try to use Digest::SHA.  If not installed, use the slower

Modified: branches/upstream/libdigest-sha-perl/current/src/hmac.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/src/hmac.c?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/src/hmac.c (original)
+++ branches/upstream/libdigest-sha-perl/current/src/hmac.c Thu Mar 10 07:16:42 2011
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2011 Mark Shelor, All Rights Reserved
  *
- * Version: 5.60
- * Thu Mar  3 05:26:42 MST 2011
+ * Version: 5.61
+ * Wed Mar  9 05:26:36 MST 2011
  *
  */
 

Modified: branches/upstream/libdigest-sha-perl/current/src/hmac.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/src/hmac.h?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/src/hmac.h (original)
+++ branches/upstream/libdigest-sha-perl/current/src/hmac.h Thu Mar 10 07:16:42 2011
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2011 Mark Shelor, All Rights Reserved
  *
- * Version: 5.60
- * Thu Mar  3 05:26:42 MST 2011
+ * Version: 5.61
+ * Wed Mar  9 05:26:36 MST 2011
  *
  */
 

Modified: branches/upstream/libdigest-sha-perl/current/src/sha.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/src/sha.c?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/src/sha.c (original)
+++ branches/upstream/libdigest-sha-perl/current/src/sha.c Thu Mar 10 07:16:42 2011
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2011 Mark Shelor, All Rights Reserved
  *
- * Version: 5.60
- * Thu Mar  3 05:26:42 MST 2011
+ * Version: 5.61
+ * Wed Mar  9 05:26:36 MST 2011
  *
  */
 
@@ -473,6 +473,12 @@
 	return(s->digestlen);
 }
 
+/* shaalg: returns which SHA algorithm is being used */
+int shaalg(SHA *s)
+{
+	return(s->alg);
+}
+
 /* shadup: duplicates current digest object */
 SHA *shadup(SHA *s)
 {

Modified: branches/upstream/libdigest-sha-perl/current/src/sha.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/src/sha.h?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/src/sha.h (original)
+++ branches/upstream/libdigest-sha-perl/current/src/sha.h Thu Mar 10 07:16:42 2011
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2011 Mark Shelor, All Rights Reserved
  *
- * Version: 5.60
- * Thu Mar  3 05:26:42 MST 2011
+ * Version: 5.61
+ * Wed Mar  9 05:26:36 MST 2011
  *
  */
 
@@ -211,6 +211,7 @@
 char		*shahex		(_SHA_STATE);
 char		*shabase64	(_SHA_STATE);
 int		 shadsize	(_SHA_STATE);
+int		 shaalg		(_SHA_STATE);
 SHA		*shadup		(_SHA_STATE);
 int		 shadump	(_SHA_FNAME, _SHA_STATE);
 SHA		*shaload	(_SHA_FNAME);

Modified: branches/upstream/libdigest-sha-perl/current/src/sha64bit.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/src/sha64bit.c?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/src/sha64bit.c (original)
+++ branches/upstream/libdigest-sha-perl/current/src/sha64bit.c Thu Mar 10 07:16:42 2011
@@ -6,6 +6,8 @@
 #undef sha512
 #undef H0384
 #undef H0512
+#undef H0512224
+#undef H0512256
 
 #define sha_384_512	1
 
@@ -70,8 +72,8 @@
 C64(0x8c3d37c819544da2), C64(0x73e1996689dcd4d6), C64(0x1dfab7ae32ff9c82),
 C64(0x679dd514582f9fcf), C64(0x0f6d2b697bd44da8), C64(0x77e36f7304c48942),
 C64(0x3f9d85a86a1d36c8), C64(0x1112e6ad91d692a1)
+};
 
-};
 static W64 H0512256[8] =	/* SHA-512/256 initial hash value */
 {
 C64(0x22312194fc2bf72c), C64(0x9f555fa3c84c64c2), C64(0x2393b86b6f53b151),

Modified: branches/upstream/libdigest-sha-perl/current/src/sha64bit.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-sha-perl/current/src/sha64bit.h?rev=71028&op=diff
==============================================================================
--- branches/upstream/libdigest-sha-perl/current/src/sha64bit.h (original)
+++ branches/upstream/libdigest-sha-perl/current/src/sha64bit.h Thu Mar 10 07:16:42 2011
@@ -13,3 +13,5 @@
 #define sha512			NULL
 #define H0384			H01
 #define H0512			H01
+#define H0512224		H01
+#define H0512256		H01




More information about the Pkg-perl-cvs-commits mailing list