r3405 - in /packages/libdigest-sha-perl/branches/upstream/current: Changes META.yml README SHA.pm SIGNATURE shasum src/hmac.c src/hmac.h src/sha.c src/sha.h src/sha64bit.c

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sun Aug 6 18:40:21 UTC 2006


Author: gregoa-guest
Date: Sun Aug  6 18:40:15 2006
New Revision: 3405

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3405
Log:
Load /tmp/tmp.Nbjkms9073/libdigest-sha-perl-5.43 into
packages/libdigest-sha-perl/branches/upstream/current.

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

Modified: packages/libdigest-sha-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/Changes?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/Changes (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/Changes Sun Aug  6 18:40:15 2006
@@ -1,4 +1,13 @@
 Revision history for Perl extension Digest::SHA.
+
+5.43  Sat Aug  5 02:36:18 MST 2006
+	- undid Perl Best Practice of favoring 3-argument "open"
+		-- 3-arg version uses different semantics for "-"
+			causing bugs in addfile and shasum
+	- modified underlying C functions to use ANSI prototypes
+		-- requested by Steve Hay (ref. Smoke [5.9.4] 28630)
+		-- K&R style was causing numerous warnings from
+			Borland compiler
 
 5.42  Mon Jul 24 04:04:40 MST 2006
 	- minor code changes suggested by Perl::Critic

Modified: packages/libdigest-sha-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/META.yml?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/META.yml (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/META.yml Sun Aug  6 18:40:15 2006
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name: Digest-SHA
-version: 5.42
+version: 5.43
 author:
   - Mark Shelor, mshelor at cpan.org
 abstract: Perl extension for SHA-1/224/256/384/512
@@ -12,5 +12,5 @@
 provides:
   Digest::SHA:
     file: SHA.pm
-    version: 5.42
+    version: 5.43
 generated_by: Module::Build version 0.22

Modified: packages/libdigest-sha-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/README?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/README (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/README Sun Aug  6 18:40:15 2006
@@ -1,4 +1,4 @@
-Digest::SHA version 5.42
+Digest::SHA version 5.43
 ========================
 
 Digest::SHA is a complete implementation of the NIST Secure Hash

Modified: packages/libdigest-sha-perl/branches/upstream/current/SHA.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/SHA.pm?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/SHA.pm (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/SHA.pm Sun Aug  6 18:40:15 2006
@@ -6,7 +6,7 @@
 use warnings;
 use integer;
 
-our $VERSION = '5.42';
+our $VERSION = '5.43';
 
 require Exporter;
 our @ISA = qw(Exporter);
@@ -118,7 +118,8 @@
 	my ($binary, $portable) = map { $_ eq $mode } ("b", "p");
 	my $text = -T $file;
 
-	open(my $fh, q{<}, $file) or _bail("Open failed");
+	open(my $fh, "<$file")			## no critic
+		or _bail("Open failed");
 	binmode($fh) if $binary || $portable;
 
 	unless ($portable && $text) {

Modified: packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE Sun Aug  6 18:40:15 2006
@@ -14,21 +14,21 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 ad8fa1bc0f14e56778aec3a89c0c7a09c80eb81a Changes
+SHA1 22f6a48fe9f9501f12b0cad94d58cf77bfe94153 Changes
 SHA1 952a17b73eeb605287d1aa08d2e8bf4837106b43 MANIFEST
-SHA1 8d49a31de153d1e5606f0f5e6f438cc7ddbca17f META.yml
+SHA1 78c1d9d45c3085b0664157881cd7b85effd80469 META.yml
 SHA1 def31e4ea732857338ca9858b091a7b9b4c35fd7 Makefile.PL
-SHA1 875c1a5f12cde0c3b957927f3712b5df2ca650de README
-SHA1 7be8a1f1af914154bea121e282cfb9914c04beb2 SHA.pm
+SHA1 48c876f4f54c15330456b7370e6f795a1c32fe61 README
+SHA1 b7f3112261ccf286555d9820d4b955fe672f3ce2 SHA.pm
 SHA1 51d3d1db41241cdf960bb3d5c81efa9eac13b197 SHA.xs
 SHA1 48517b1bf0ddf48ae4bc24910d3b9af625bc2325 ppport.h
-SHA1 13198e4cd149d2fac3c4b8ff6936cad0d72d47fc shasum
-SHA1 ed60ca4dd1e4160972809db753e0e1341276a59a src/hmac.c
-SHA1 b5b0165a2182a7b0fc6f9a5ccb9bd24955314e2a src/hmac.h
+SHA1 95196b34d081d5193fe3c2971a7291c295000521 shasum
+SHA1 5f2a74d899d41db4dd85aeab5e8dce9501ea62f3 src/hmac.c
+SHA1 470cd464b45eb6141a60d32de3d08ee2fa23f6de src/hmac.h
 SHA1 7589c6ce33e74a58ded932d69756659e91723fdb src/hmacxtra.c
-SHA1 1389b810490272e22502901e2d79d031ee136e8a src/sha.c
-SHA1 dc0f942a8bc33b44b487888ec6233ff20d3f25a0 src/sha.h
-SHA1 c1bba35de65c8d81362472b76075dba8cf1e542b src/sha64bit.c
+SHA1 f64324f375fe79033d8c7e63661d430c79a2b6c7 src/sha.c
+SHA1 b4400eb0a1fc3f62bffc6068bc4d4e3f057df2af src/sha.h
+SHA1 23e402877ecb241952231123122ec97477cbbb2f src/sha64bit.c
 SHA1 48d806b05a15dfd8211d5f7158b3294d86fa24d2 src/sha64bit.h
 SHA1 329ac17325437c725331fbf84ae0c9484f50041a src/shaxtra.c
 SHA1 18aa2e2abf4f8b3a5dd2cd6ba74ea242ddfe4071 t/0-pod-coverage.t
@@ -71,7 +71,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2.2 (GNU/Linux)
 
-iD8DBQFExKmvD1RhyLU4xRwRAtcBAJ92pl1M3eGlIxJYV+4S0pSM5XtHYgCeIVIE
-QZo6fH6EuRpB5z3HfEZR1Gc=
-=b3Nh
+iD8DBQFE1GsfD1RhyLU4xRwRApNUAJ9Ex4V+HlkWFcQ+bKTDv+dfa7qA9wCfZtRD
+8F8ioRaEOhj4/5lRcZoIy80=
+=GzCu
 -----END PGP SIGNATURE-----

Modified: packages/libdigest-sha-perl/branches/upstream/current/shasum
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/shasum?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/shasum (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/shasum Sun Aug  6 18:40:15 2006
@@ -4,8 +4,8 @@
 	#
 	# Copyright (C) 2003-2006 Mark Shelor, All Rights Reserved
 	#
-	# Version: 5.42
-	# Mon Jul 24 04:04:40 MST 2006
+	# Version: 5.43
+	# Sat Aug  5 02:36:18 MST 2006
 
 =head1 NAME
 
@@ -52,7 +52,7 @@
 use strict;
 use Getopt::Long;
 
-my $VERSION = "5.42";
+my $VERSION = "5.43";
 
 
 	# Try to use Digest::SHA, since it's faster.  If not installed,
@@ -201,7 +201,7 @@
 	my ($fh, $sum, $fname, $rsp);
 
 	die "shasum: $checkfile: $!\n"
-		unless open($fh, q{<}, $checkfile);
+		unless open($fh, "<$checkfile");	## no critic
 	while (<$fh>) {
 		s/\s+$//;
 		($sum, $modesym, $fname) = /^(\S+) (.)(.*)$/;

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c Sun Aug  6 18:40:15 2006
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2006 Mark Shelor, All Rights Reserved
  *
- * Version: 5.42
- * Mon Jul 24 04:04:40 MST 2006
+ * Version: 5.43
+ * Sat Aug  5 02:36:18 MST 2006
  *
  */
 

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h Sun Aug  6 18:40:15 2006
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2006 Mark Shelor, All Rights Reserved
  *
- * Version: 5.42
- * Mon Jul 24 04:04:40 MST 2006
+ * Version: 5.43
+ * Sat Aug  5 02:36:18 MST 2006
  *
  */
 
@@ -22,39 +22,37 @@
 	unsigned char key[SHA_MAX_BLOCK_BITS/8];
 } HMAC;
 
-#if defined(__STDC__) && __STDC__ != 0
-	#define _HMAC_P(protos)	protos
-#else
-	#define _HMAC_P(protos)	()
-#endif
-
 #define _HMAC_STATE	HMAC *h
 #define _HMAC_ALG	int alg
 #define _HMAC_DATA	unsigned char *bitstr, unsigned long bitcnt
 #define _HMAC_KEY	unsigned char *key, unsigned int keylen
 
-HMAC		*hmacopen 	_HMAC_P((_HMAC_ALG, _HMAC_KEY));
-unsigned long	 hmacwrite	_HMAC_P((_HMAC_DATA, _HMAC_STATE));
-void		 hmacfinish	_HMAC_P((_HMAC_STATE));
-unsigned char	*hmacdigest	_HMAC_P((_HMAC_STATE));
-char		*hmachex	_HMAC_P((_HMAC_STATE));
-char		*hmacbase64	_HMAC_P((_HMAC_STATE));
-int		 hmacclose	_HMAC_P((_HMAC_STATE));
+HMAC		*hmacopen 	(_HMAC_ALG, _HMAC_KEY);
+unsigned long	 hmacwrite	(_HMAC_DATA, _HMAC_STATE);
+void		 hmacfinish	(_HMAC_STATE);
+unsigned char	*hmacdigest	(_HMAC_STATE);
+char		*hmachex	(_HMAC_STATE);
+char		*hmacbase64	(_HMAC_STATE);
+int		 hmacclose	(_HMAC_STATE);
 
-unsigned char	*hmac1digest	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac1hex	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac1base64	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-unsigned char	*hmac224digest	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac224hex	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac224base64	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-unsigned char	*hmac256digest	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac256hex	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac256base64	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-unsigned char	*hmac384digest	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac384hex	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac384base64	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-unsigned char	*hmac512digest	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac512hex	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
-char		*hmac512base64	_HMAC_P((_HMAC_DATA, _HMAC_KEY));
+#ifndef SHA_PERL_MODULE
+
+unsigned char	*hmac1digest	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac1hex	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac1base64	(_HMAC_DATA, _HMAC_KEY);
+unsigned char	*hmac224digest	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac224hex	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac224base64	(_HMAC_DATA, _HMAC_KEY);
+unsigned char	*hmac256digest	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac256hex	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac256base64	(_HMAC_DATA, _HMAC_KEY);
+unsigned char	*hmac384digest	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac384hex	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac384base64	(_HMAC_DATA, _HMAC_KEY);
+unsigned char	*hmac512digest	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac512hex	(_HMAC_DATA, _HMAC_KEY);
+char		*hmac512base64	(_HMAC_DATA, _HMAC_KEY);
+
+#endif
 
 #endif	/* _INCLUDE_HMAC_H_ */

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/sha.c
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/src/sha.c?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/sha.c (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/sha.c Sun Aug  6 18:40:15 2006
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2006 Mark Shelor, All Rights Reserved
  *
- * Version: 5.42
- * Mon Jul 24 04:04:40 MST 2006
+ * Version: 5.43
+ * Sat Aug  5 02:36:18 MST 2006
  *
  */
 
@@ -83,9 +83,7 @@
 	C32(0x510e527f), C32(0x9b05688c), C32(0x1f83d9ab), C32(0x5be0cd19)
 };
 
-static void sha1(s, block)		/* SHA-1 transform */
-SHA *s;
-UCHR *block;
+static void sha1(SHA *s, UCHR *block)		/* SHA-1 transform */
 {
 	W32 a, b, c, d, e;
 	SHA_STO_CLASS W32 W[16];
@@ -152,9 +150,7 @@
 	H[0] += a; H[1] += b; H[2] += c; H[3] += d; H[4] += e;
 }
 
-static void sha256(s, block)		/* SHA-224/256 transform */
-SHA *s;
-UCHR *block;
+static void sha256(SHA *s, UCHR *block)		/* SHA-224/256 transform */
 {
 	W32 a, b, c, d, e, f, g, h, T1;
 	SHA_STO_CLASS W32 W[16];
@@ -226,9 +222,7 @@
 			: ((nbytes) / 3) * 4 + ((nbytes) % 3) + 1)
 
 /* w32mem: writes 32-bit word to memory in big-endian order */
-static void w32mem(mem, w32)
-UCHR *mem;
-W32 w32;
+static void w32mem(UCHR *mem, W32 w32)
 {
 	int i;
 
@@ -237,8 +231,7 @@
 }
 
 /* digcpy: writes current state to digest buffer */
-static void digcpy(s)
-SHA *s;
+static void digcpy(SHA *s)
 {
 	UINT i;
 	UCHR *d = s->digest;
@@ -265,8 +258,7 @@
 	} while (0)
 
 /* sharewind: re-initializes the digest object */
-void sharewind(s)
-SHA *s;
+void sharewind(SHA *s)
 {
 	if      (s->alg == SHA1)   SHA_INIT(1, 1);
 	else if (s->alg == SHA224) SHA_INIT(224, 256);
@@ -276,8 +268,7 @@
 }
 
 /* shaopen: creates a new digest object */
-SHA *shaopen(alg)
-int alg;
+SHA *shaopen(int alg)
 {
 	SHA *s;
 
@@ -295,10 +286,7 @@
 }
 
 /* shadirect: updates state directly (w/o going through s->block) */
-static ULNG shadirect(bitstr, bitcnt, s)
-UCHR *bitstr;
-ULNG bitcnt;
-SHA *s;
+static ULNG shadirect(UCHR *bitstr, ULNG bitcnt, SHA *s)
 {
 	ULNG savecnt = bitcnt;
 
@@ -315,10 +303,7 @@
 }
 
 /* shabytes: updates state for byte-aligned input data */
-static ULNG shabytes(bitstr, bitcnt, s)
-UCHR *bitstr;
-ULNG bitcnt;
-SHA *s;
+static ULNG shabytes(UCHR *bitstr, ULNG bitcnt, SHA *s)
 {
 	UINT offset;
 	UINT nbits;
@@ -341,10 +326,7 @@
 }
 
 /* shabits: updates state for bit-aligned input data */
-static ULNG shabits(bitstr, bitcnt, s)
-UCHR *bitstr;
-ULNG bitcnt;
-SHA *s;
+static ULNG shabits(UCHR *bitstr, ULNG bitcnt, SHA *s)
 {
 	UINT i;
 	UINT gap;
@@ -380,10 +362,7 @@
 }
 
 /* shawrite: triggers a state update using data in bitstr/bitcnt */
-ULNG shawrite(bitstr, bitcnt, s)
-UCHR *bitstr;
-ULNG bitcnt;
-SHA *s;
+ULNG shawrite(UCHR *bitstr, ULNG bitcnt, SHA *s)
 {
 	if (bitcnt < 1)
 		return(0);
@@ -400,8 +379,7 @@
 }
 
 /* shafinish: pads remaining block(s) and computes final digest state */
-void shafinish(s)
-SHA *s;
+void shafinish(SHA *s)
 {
 	UINT lenpos, lhpos, llpos;
 
@@ -426,16 +404,14 @@
 }
 
 /* shadigest: returns pointer to current digest (binary) */
-UCHR *shadigest(s)
-SHA *s;
+UCHR *shadigest(SHA *s)
 {
 	digcpy(s);
 	return(s->digest);
 }
 
 /* shahex: returns pointer to current digest (hexadecimal) */
-char *shahex(s)
-SHA *s;
+char *shahex(SHA *s)
 {
 	int i;
 
@@ -453,10 +429,7 @@
 	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 /* encbase64: encodes input (0 to 3 bytes) into Base 64 */
-static void encbase64(in, n, out)
-UCHR *in;
-int n;
-char *out;
+static void encbase64(UCHR *in, int n, char *out)
 {
 	UCHR byte[3] = {0, 0, 0};
 
@@ -472,8 +445,7 @@
 }
 
 /* shabase64: returns pointer to current digest (Base 64) */
-char *shabase64(s)
-SHA *s;
+char *shabase64(SHA *s)
 {
 	int n;
 	UCHR *q;
@@ -493,15 +465,13 @@
 }
 
 /* shadsize: returns length of digest in bytes */
-int shadsize(s)
-SHA *s;
+int shadsize(SHA *s)
 {
 	return(s->digestlen);
 }
 
 /* shadup: duplicates current digest object */
-SHA *shadup(s)
-SHA *s;
+SHA *shadup(SHA *s)
 {
 	SHA *p;
 
@@ -513,9 +483,7 @@
 }
 
 /* shadump: dumps digest object to a human-readable ASCII file */
-int shadump(file, s)
-char *file;
-SHA *s;
+int shadump(char *file, SHA *s)
 {
 	int i, j;
 	SHA_FILE *f;
@@ -542,10 +510,7 @@
 }
 
 /* fgetstr: reads (and returns pointer to) next line of file */
-static char *fgetstr(line, maxsize, f)
-char *line;
-UINT maxsize;
-SHA_FILE *f;
+static char *fgetstr(char *line, UINT maxsize, SHA_FILE *f)
 {
 	char *p;
 
@@ -559,8 +524,7 @@
 }
 
 /* empty: returns true if line contains only whitespace characters */
-static int empty(line)
-char *line;
+static int empty(char *line)
 {
 	char *p;
 
@@ -571,9 +535,7 @@
 }
 
 /* getval: null-terminates field value, and sets pointer to rest of line */
-static char *getval(line, pprest)
-char *line;
-char **pprest;
+static char *getval(char *line, char **pprest)
 {
 	char *p, *v;
 
@@ -596,13 +558,13 @@
 #define T_Q 4			/* 64-bit value */
 
 /* ldvals: checks next line in dump file against tag, and loads values */
-static int ldvals(f, tag, type, pval, reps, base)
-SHA_FILE *f;
-char *tag;
-int type;
-void *pval;
-int reps;
-int base;
+static int ldvals(
+	SHA_FILE *f,
+	char *tag,
+	int type,
+	void *pval,
+	int reps,
+	int base)
 {
 	char *p, *pr, line[512];
 	UCHR *pc = (UCHR *) pval; UINT *pi = (UINT *) pval;
@@ -627,9 +589,7 @@
 }
 
 /* closeall: closes dump file and de-allocates digest object */
-static SHA *closeall(f, s)
-SHA_FILE *f;
-SHA *s;
+static SHA *closeall(SHA_FILE *f, SHA *s)
 {
 	if (f != NULL && f != SHA_stdin())
 		SHA_close(f);
@@ -639,8 +599,7 @@
 }
 
 /* shaload: creates digest object corresponding to contents of dump file */
-SHA *shaload(file)
-char *file;
+SHA *shaload(char *file)
 {
 	int alg;
 	SHA *s = NULL;
@@ -671,8 +630,7 @@
 }
 
 /* shaclose: de-allocates digest object */
-int shaclose(s)
-SHA *s;
+int shaclose(SHA *s)
 {
 	if (s != NULL) {
 		memset(s, 0, sizeof(SHA));

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/sha.h
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/src/sha.h?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/sha.h (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/sha.h Sun Aug  6 18:40:15 2006
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2006 Mark Shelor, All Rights Reserved
  *
- * Version: 5.42
- * Mon Jul 24 04:04:40 MST 2006
+ * Version: 5.43
+ * Sat Aug  5 02:36:18 MST 2006
  *
  */
 
@@ -174,9 +174,9 @@
 	#define SHA_H_SIZE	sizeof(SHA32) * 8
 #endif
 
-typedef struct {
+typedef struct SHA {
 	int alg;
-	void (*sha)();
+	void (*sha)(struct SHA *, unsigned char *);
 	unsigned char H[SHA_H_SIZE];
 	unsigned char block[SHA_MAX_BLOCK_BITS/8];
 	unsigned int blockcnt;
@@ -192,44 +192,42 @@
 #define SHA_FMT_HEX 2
 #define SHA_FMT_BASE64 3
 
-#if defined(__STDC__) && __STDC__ != 0
-	#define _SHA_P(protos)	protos
-#else
-	#define _SHA_P(protos)	()
-#endif
-
 #define _SHA_STATE	SHA *s
 #define _SHA_ALG	int alg
 #define _SHA_DATA	unsigned char *bitstr, unsigned long bitcnt
 #define _SHA_FNAME	char *filename
 
-SHA		*shaopen	_SHA_P((_SHA_ALG));
-unsigned long	 shawrite	_SHA_P((_SHA_DATA, _SHA_STATE));
-void		 shafinish	_SHA_P((_SHA_STATE));
-void		 sharewind	_SHA_P((_SHA_STATE));
-unsigned char	*shadigest	_SHA_P((_SHA_STATE));
-char		*shahex		_SHA_P((_SHA_STATE));
-char		*shabase64	_SHA_P((_SHA_STATE));
-int		 shadsize	_SHA_P((_SHA_STATE));
-SHA		*shadup		_SHA_P((_SHA_STATE));
-int		 shadump	_SHA_P((_SHA_FNAME, _SHA_STATE));
-SHA		*shaload	_SHA_P((_SHA_FNAME));
-int		 shaclose	_SHA_P((_SHA_STATE));
-
-unsigned char	*sha1digest	_SHA_P((_SHA_DATA));
-char		*sha1hex	_SHA_P((_SHA_DATA));
-char		*sha1base64	_SHA_P((_SHA_DATA));
-unsigned char	*sha224digest	_SHA_P((_SHA_DATA));
-char		*sha224hex	_SHA_P((_SHA_DATA));
-char		*sha224base64	_SHA_P((_SHA_DATA));
-unsigned char	*sha256digest	_SHA_P((_SHA_DATA));
-char		*sha256hex	_SHA_P((_SHA_DATA));
-char		*sha256base64	_SHA_P((_SHA_DATA));
-unsigned char	*sha384digest	_SHA_P((_SHA_DATA));
-char		*sha384hex	_SHA_P((_SHA_DATA));
-char		*sha384base64	_SHA_P((_SHA_DATA));
-unsigned char	*sha512digest	_SHA_P((_SHA_DATA));
-char		*sha512hex	_SHA_P((_SHA_DATA));
-char		*sha512base64	_SHA_P((_SHA_DATA));
+SHA		*shaopen	(_SHA_ALG);
+unsigned long	 shawrite	(_SHA_DATA, _SHA_STATE);
+void		 shafinish	(_SHA_STATE);
+void		 sharewind	(_SHA_STATE);
+unsigned char	*shadigest	(_SHA_STATE);
+char		*shahex		(_SHA_STATE);
+char		*shabase64	(_SHA_STATE);
+int		 shadsize	(_SHA_STATE);
+SHA		*shadup		(_SHA_STATE);
+int		 shadump	(_SHA_FNAME, _SHA_STATE);
+SHA		*shaload	(_SHA_FNAME);
+int		 shaclose	(_SHA_STATE);
+
+#ifndef SHA_PERL_MODULE
+
+unsigned char	*sha1digest	(_SHA_DATA);
+char		*sha1hex	(_SHA_DATA);
+char		*sha1base64	(_SHA_DATA);
+unsigned char	*sha224digest	(_SHA_DATA);
+char		*sha224hex	(_SHA_DATA);
+char		*sha224base64	(_SHA_DATA);
+unsigned char	*sha256digest	(_SHA_DATA);
+char		*sha256hex	(_SHA_DATA);
+char		*sha256base64	(_SHA_DATA);
+unsigned char	*sha384digest	(_SHA_DATA);
+char		*sha384hex	(_SHA_DATA);
+char		*sha384base64	(_SHA_DATA);
+unsigned char	*sha512digest	(_SHA_DATA);
+char		*sha512hex	(_SHA_DATA);
+char		*sha512base64	(_SHA_DATA);
+
+#endif
 
 #endif	/* _INCLUDE_SHA_H_ */

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/sha64bit.c
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdigest-sha-perl/branches/upstream/current/src/sha64bit.c?rev=3405&op=diff
==============================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/sha64bit.c (original)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/sha64bit.c Sun Aug  6 18:40:15 2006
@@ -66,8 +66,7 @@
 };
 
 /* strto64: converts hex string to a 64-bit word */
-static W64 strto64(s)
-char *s;
+static W64 strto64(char *s)
 {
 	char str[2] = {0, 0};
 	W64 u = C64(0);
@@ -77,9 +76,7 @@
 	return(u);
 }
 
-static void sha512(s, block)	/* SHA-384/512 transform */
-SHA *s;
-unsigned char *block;
+static void sha512(SHA *s, unsigned char *block) /* SHA-384/512 transform */
 {
 	W64 a, b, c, d, e, f, g, h, T1, T2;
 	SHA_STO_CLASS W64 W[80];




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