pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/p5-Digest-Hashcash Initial import of the Dige...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ea0c884319fb
branches:  trunk
changeset: 465334:ea0c884319fb
user:      heinz <heinz%pkgsrc.org@localhost>
date:      Sun Dec 28 01:07:58 2003 +0000

description:
Initial import of the Digest::Hashcash Perl module.

The Digest::Hashcash Perl module calculates n-bit partial hash
collisions on chosen texts.
The idea of using partial hashes is that they can be made arbitrarily
expensive to compute (by choosing the desired number of bits of
collision), and yet can be verified instantly. This can be used as the
basis for an e-cash system measured in burnt CPU cycles. Such cash
systems can be used to throttle systematic abuses of un-metered internet
resources.

diffstat:

 security/p5-Digest-Hashcash/DESCR            |   8 +++++
 security/p5-Digest-Hashcash/Makefile         |  22 ++++++++++++++++
 security/p5-Digest-Hashcash/PLIST            |   1 +
 security/p5-Digest-Hashcash/distinfo         |   5 +++
 security/p5-Digest-Hashcash/patches/patch-aa |  38 ++++++++++++++++++++++++++++
 5 files changed, 74 insertions(+), 0 deletions(-)

diffs (94 lines):

diff -r 925c7bb98c32 -r ea0c884319fb security/p5-Digest-Hashcash/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/p5-Digest-Hashcash/DESCR Sun Dec 28 01:07:58 2003 +0000
@@ -0,0 +1,8 @@
+The Digest::Hashcash Perl module calculates n-bit partial hash
+collisions on chosen texts.
+The idea of using partial hashes is that they can be made arbitrarily
+expensive to compute (by choosing the desired number of bits of
+collision), and yet can be verified instantly. This can be used as the
+basis for an e-cash system measured in burnt CPU cycles. Such cash
+systems can be used to throttle systematic abuses of un-metered internet
+resources.
diff -r 925c7bb98c32 -r ea0c884319fb security/p5-Digest-Hashcash/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/p5-Digest-Hashcash/Makefile      Sun Dec 28 01:07:58 2003 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/12/28 01:07:58 heinz Exp $
+#
+
+DISTNAME=      Digest-Hashcash-0.02
+PKGNAME=       p5-${DISTNAME}
+SVR4_PKGNAME=  p5hca
+CATEGORIES=    security perl5
+MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:=Digest/}
+
+MAINTAINER=    heinz%NetBSD.org@localhost
+HOMEPAGE=      http://search.cpan.org/dist/Digest-Hashcash/
+COMMENT=       Perl5 extension module for hashcash hashes
+
+DEPENDS+=      p5-Time-HiRes>=1.2:../../time/p5-Time-HiRes
+
+USE_BUILDLINK2=                YES
+
+PERL5_CONFIGURE=       YES
+PERL5_PACKLIST=                ${PERL5_SITEARCH}/auto/Digest/Hashcash/.packlist
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 925c7bb98c32 -r ea0c884319fb security/p5-Digest-Hashcash/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/p5-Digest-Hashcash/PLIST Sun Dec 28 01:07:58 2003 +0000
@@ -0,0 +1,1 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/28 01:07:58 heinz Exp $
diff -r 925c7bb98c32 -r ea0c884319fb security/p5-Digest-Hashcash/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/p5-Digest-Hashcash/distinfo      Sun Dec 28 01:07:58 2003 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/12/28 01:07:58 heinz Exp $
+
+SHA1 (Digest-Hashcash-0.02.tar.gz) = d9b0cb7e482367b5a8886ca2c02309c3a2198c9f
+Size (Digest-Hashcash-0.02.tar.gz) = 14313 bytes
+SHA1 (patch-aa) = 3383ac567fbef65e6f9f3afac775c1b96d02cad7
diff -r 925c7bb98c32 -r ea0c884319fb security/p5-Digest-Hashcash/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/p5-Digest-Hashcash/patches/patch-aa      Sun Dec 28 01:07:58 2003 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/12/28 01:07:58 heinz Exp $
+
+--- Hashcash.xs.orig   Sun Sep  7 02:52:43 2003
++++ Hashcash.xs
+@@ -4,7 +4,7 @@
+ 
+ #include <time.h>
+ #include <stdlib.h>
+-#include <stdint.h>
++#include <inttypes.h>
+ 
+ /* NIST Secure Hash Algorithm */
+ /* heavily modified by Uwe Hollerbach <uh@alumni.caltech edu> */
+@@ -45,7 +45,7 @@ typedef U64TYPE ULONG;
+ #   define BYTEORDER 0x87654321   
+ # endif
+ #else
+-typedef uint_fast32_t ULONG;     /* 32-or-more-bit quantity */
++typedef uint32_t ULONG;     /* 32-or-more-bit quantity */
+ #endif
+ 
+ #if GCCX86ASM
+@@ -356,6 +356,7 @@ _estimate_rounds ()
+ SV *
+ _gentoken (int size, IV timestamp, char *resource, char *trial = "", int extrarand = 0)
+       CODE:
++      {
+         SHA_INFO ctx1, ctx;
+         char *token, *seq, *s;
+         int toklen, i;
+@@ -412,6 +413,7 @@ _gentoken (int size, IV timestamp, char 
+           }
+ 
+         RETVAL = newSVpvn (token, toklen);
++      }
+       OUTPUT:
+         RETVAL
+ 



Home | Main Index | Thread Index | Old Index