diff options
author | heinz <heinz@pkgsrc.org> | 2003-12-28 01:07:58 +0000 |
---|---|---|
committer | heinz <heinz@pkgsrc.org> | 2003-12-28 01:07:58 +0000 |
commit | 8b5e9e6d93c2b67a73aa094711ffc4135afca905 (patch) | |
tree | 01ae938accb7f87a9244c9ba92f77cb401246c71 /security | |
parent | d000caa8e3a9f483e7d40e0a8b4d4e2ad7b97526 (diff) | |
download | pkgsrc-8b5e9e6d93c2b67a73aa094711ffc4135afca905.tar.gz |
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 (limited to 'security')
-rw-r--r-- | security/p5-Digest-Hashcash/DESCR | 8 | ||||
-rw-r--r-- | security/p5-Digest-Hashcash/Makefile | 22 | ||||
-rw-r--r-- | security/p5-Digest-Hashcash/PLIST | 1 | ||||
-rw-r--r-- | security/p5-Digest-Hashcash/distinfo | 5 | ||||
-rw-r--r-- | security/p5-Digest-Hashcash/patches/patch-aa | 38 |
5 files changed, 74 insertions, 0 deletions
diff --git a/security/p5-Digest-Hashcash/DESCR b/security/p5-Digest-Hashcash/DESCR new file mode 100644 index 00000000000..70cb67d7fe7 --- /dev/null +++ b/security/p5-Digest-Hashcash/DESCR @@ -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 --git a/security/p5-Digest-Hashcash/Makefile b/security/p5-Digest-Hashcash/Makefile new file mode 100644 index 00000000000..2c050c66cc7 --- /dev/null +++ b/security/p5-Digest-Hashcash/Makefile @@ -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 +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 --git a/security/p5-Digest-Hashcash/PLIST b/security/p5-Digest-Hashcash/PLIST new file mode 100644 index 00000000000..4493def5a80 --- /dev/null +++ b/security/p5-Digest-Hashcash/PLIST @@ -0,0 +1 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/28 01:07:58 heinz Exp $ diff --git a/security/p5-Digest-Hashcash/distinfo b/security/p5-Digest-Hashcash/distinfo new file mode 100644 index 00000000000..0727a582075 --- /dev/null +++ b/security/p5-Digest-Hashcash/distinfo @@ -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 --git a/security/p5-Digest-Hashcash/patches/patch-aa b/security/p5-Digest-Hashcash/patches/patch-aa new file mode 100644 index 00000000000..cf3f678728f --- /dev/null +++ b/security/p5-Digest-Hashcash/patches/patch-aa @@ -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 + |