summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-11-25 17:36:18 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-11-25 17:36:18 +0000
commitab2aaaf441daa1a553b795d595da60aa52091a3d (patch)
treed8fc3a44c130cf483019ac82beaf9ebd2a585a4d /cpan
parentb219737899b7744755182cf4dadebfabb21e24bc (diff)
downloadperl-ab2aaaf441daa1a553b795d595da60aa52091a3d.tar.gz
Update Digest-SHA to CPAN version 5.74
[DELTA] 5.74 Sat Nov 24 03:10:18 MST 2012 - handle wide-string input by converting to bytes first -- viz. use SvPVbyte instead of SvPV in SHA.xs -- thanks to Eric Brine for summary and code
Diffstat (limited to 'cpan')
-rw-r--r--cpan/Digest-SHA/Changes5
-rw-r--r--cpan/Digest-SHA/README2
-rw-r--r--cpan/Digest-SHA/SHA.xs12
-rw-r--r--cpan/Digest-SHA/lib/Digest/SHA.pm2
-rw-r--r--cpan/Digest-SHA/shasum6
-rw-r--r--cpan/Digest-SHA/src/hmac.c4
-rw-r--r--cpan/Digest-SHA/src/hmac.h4
-rw-r--r--cpan/Digest-SHA/src/sha.c4
-rw-r--r--cpan/Digest-SHA/src/sha.h4
9 files changed, 26 insertions, 17 deletions
diff --git a/cpan/Digest-SHA/Changes b/cpan/Digest-SHA/Changes
index f0fb0c4c27..0651b7721f 100644
--- a/cpan/Digest-SHA/Changes
+++ b/cpan/Digest-SHA/Changes
@@ -1,5 +1,10 @@
Revision history for Perl extension Digest::SHA.
+5.74 Sat Nov 24 03:10:18 MST 2012
+ - handle wide-string input by converting to bytes first
+ -- viz. use SvPVbyte instead of SvPV in SHA.xs
+ -- thanks to Eric Brine for summary and code
+
5.73 Wed Oct 31 04:32:44 MST 2012
- provided workaround for DEC compiler bug (ref. Makefile.PL)
diff --git a/cpan/Digest-SHA/README b/cpan/Digest-SHA/README
index cf04631dae..acae6e4e1c 100644
--- a/cpan/Digest-SHA/README
+++ b/cpan/Digest-SHA/README
@@ -1,4 +1,4 @@
-Digest::SHA version 5.73
+Digest::SHA version 5.74
========================
Digest::SHA is a complete implementation of the NIST Secure Hash
diff --git a/cpan/Digest-SHA/SHA.xs b/cpan/Digest-SHA/SHA.xs
index 8124a5de70..cb89152592 100644
--- a/cpan/Digest-SHA/SHA.xs
+++ b/cpan/Digest-SHA/SHA.xs
@@ -2,6 +2,10 @@
#include "perl.h"
#include "XSUB.h"
+#ifndef SvPVbyte
+#define SvPVbyte SvPV
+#endif
+
#include "src/sha.c"
#include "src/hmac.c"
@@ -87,7 +91,7 @@ PPCODE:
if ((state = shaopen(ix2alg[ix])) == NULL)
XSRETURN_UNDEF;
for (i = 0; i < items; i++) {
- data = (unsigned char *) (SvPV(ST(i), len));
+ data = (unsigned char *) (SvPVbyte(ST(i), len));
while (len > MAX_WRITE_SIZE) {
shawrite(data, MAX_WRITE_SIZE << 3, state);
data += MAX_WRITE_SIZE;
@@ -141,11 +145,11 @@ PREINIT:
HMAC *state;
char *result;
PPCODE:
- key = (unsigned char *) (SvPV(ST(items-1), len));
+ key = (unsigned char *) (SvPVbyte(ST(items-1), len));
if ((state = hmacopen(ix2alg[ix], key, len)) == NULL)
XSRETURN_UNDEF;
for (i = 0; i < items - 1; i++) {
- data = (unsigned char *) (SvPV(ST(i), len));
+ data = (unsigned char *) (SvPVbyte(ST(i), len));
while (len > MAX_WRITE_SIZE) {
hmacwrite(data, MAX_WRITE_SIZE << 3, state);
data += MAX_WRITE_SIZE;
@@ -193,7 +197,7 @@ PREINIT:
PPCODE:
state = INT2PTR(SHA *, SvIV(SvRV(SvRV(self))));
for (i = 1; i < items; i++) {
- data = (unsigned char *) (SvPV(ST(i), len));
+ data = (unsigned char *) (SvPVbyte(ST(i), len));
while (len > MAX_WRITE_SIZE) {
shawrite(data, MAX_WRITE_SIZE << 3, state);
data += MAX_WRITE_SIZE;
diff --git a/cpan/Digest-SHA/lib/Digest/SHA.pm b/cpan/Digest-SHA/lib/Digest/SHA.pm
index a341991d35..5edaae96b5 100644
--- a/cpan/Digest-SHA/lib/Digest/SHA.pm
+++ b/cpan/Digest-SHA/lib/Digest/SHA.pm
@@ -7,7 +7,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use Fcntl;
use integer;
-$VERSION = '5.73';
+$VERSION = '5.74';
require Exporter;
require DynaLoader;
diff --git a/cpan/Digest-SHA/shasum b/cpan/Digest-SHA/shasum
index 12d2ca5c04..643651cbb7 100644
--- a/cpan/Digest-SHA/shasum
+++ b/cpan/Digest-SHA/shasum
@@ -4,8 +4,8 @@
##
## Copyright (C) 2003-2012 Mark Shelor, All Rights Reserved
##
- ## Version: 5.73
- ## Wed Oct 31 04:32:44 MST 2012
+ ## Version: 5.74
+ ## Sat Nov 24 03:10:18 MST 2012
## shasum SYNOPSIS adapted from GNU Coreutils sha1sum.
## Add an "-a" option for algorithm selection, a "-p"
@@ -97,7 +97,7 @@ use strict;
use Fcntl;
use Getopt::Long;
-my $VERSION = "5.73";
+my $VERSION = "5.74";
## Try to use Digest::SHA. If not installed, use the slower
diff --git a/cpan/Digest-SHA/src/hmac.c b/cpan/Digest-SHA/src/hmac.c
index c6ab0a00b8..2a429de8e1 100644
--- a/cpan/Digest-SHA/src/hmac.c
+++ b/cpan/Digest-SHA/src/hmac.c
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2012 Mark Shelor, All Rights Reserved
*
- * Version: 5.73
- * Wed Oct 31 04:32:44 MST 2012
+ * Version: 5.74
+ * Sat Nov 24 03:10:18 MST 2012
*
*/
diff --git a/cpan/Digest-SHA/src/hmac.h b/cpan/Digest-SHA/src/hmac.h
index 99d6502ff6..f45dbe5d81 100644
--- a/cpan/Digest-SHA/src/hmac.h
+++ b/cpan/Digest-SHA/src/hmac.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2012 Mark Shelor, All Rights Reserved
*
- * Version: 5.73
- * Wed Oct 31 04:32:44 MST 2012
+ * Version: 5.74
+ * Sat Nov 24 03:10:18 MST 2012
*
*/
diff --git a/cpan/Digest-SHA/src/sha.c b/cpan/Digest-SHA/src/sha.c
index d4d8862b2f..2b250fb70b 100644
--- a/cpan/Digest-SHA/src/sha.c
+++ b/cpan/Digest-SHA/src/sha.c
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2012 Mark Shelor, All Rights Reserved
*
- * Version: 5.73
- * Wed Oct 31 04:32:44 MST 2012
+ * Version: 5.74
+ * Sat Nov 24 03:10:18 MST 2012
*
*/
diff --git a/cpan/Digest-SHA/src/sha.h b/cpan/Digest-SHA/src/sha.h
index a27b566deb..8fe8598ca5 100644
--- a/cpan/Digest-SHA/src/sha.h
+++ b/cpan/Digest-SHA/src/sha.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2012 Mark Shelor, All Rights Reserved
*
- * Version: 5.73
- * Wed Oct 31 04:32:44 MST 2012
+ * Version: 5.74
+ * Sat Nov 24 03:10:18 MST 2012
*
*/