diff options
author | obache <obache@pkgsrc.org> | 2014-04-07 12:36:38 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2014-04-07 12:36:38 +0000 |
commit | 6b0838024e89cf1145da57c3fd1e4e127e4ce126 (patch) | |
tree | fe3941607f5e5063f61ed9b3a380f31af999b5a9 /security | |
parent | b1380109f7a51921c21ae16244c5103125bc9e53 (diff) | |
download | pkgsrc-6b0838024e89cf1145da57c3fd1e4e127e4ce126.tar.gz |
Import py27-ezPyCrypto-0.1.1 as security/py-ezPyCrypto.
from pkgsrc-wip, packaged by Kamel Derouiche (required for PR pkg/42561).
ezPyCrypto is the culmination of my search for an approachable yet powerful
crypto library for Python.
Diffstat (limited to 'security')
-rw-r--r-- | security/py-ezPyCrypto/DESCR | 2 | ||||
-rw-r--r-- | security/py-ezPyCrypto/Makefile | 21 | ||||
-rw-r--r-- | security/py-ezPyCrypto/PLIST | 5 | ||||
-rw-r--r-- | security/py-ezPyCrypto/distinfo | 6 | ||||
-rw-r--r-- | security/py-ezPyCrypto/patches/patch-ezPyCrypto.py | 60 |
5 files changed, 94 insertions, 0 deletions
diff --git a/security/py-ezPyCrypto/DESCR b/security/py-ezPyCrypto/DESCR new file mode 100644 index 00000000000..574265c9b2f --- /dev/null +++ b/security/py-ezPyCrypto/DESCR @@ -0,0 +1,2 @@ +ezPyCrypto is the culmination of my search for an approachable yet powerful +crypto library for Python. diff --git a/security/py-ezPyCrypto/Makefile b/security/py-ezPyCrypto/Makefile new file mode 100644 index 00000000000..52d79eaf8ff --- /dev/null +++ b/security/py-ezPyCrypto/Makefile @@ -0,0 +1,21 @@ +# $NetBSD: Makefile,v 1.1 2014/04/07 12:36:38 obache Exp $ +# + +DISTNAME= ezPyCrypto-0.1.1 +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= security python +MASTER_SITES= http://freenet.mcnabhosting.com/ezPyCrypto/ + +MAINTAINER= kamelderouiche@yahoo.com +HOMEPAGE= http://freenet.mcnabhosting.com/ezPyCrypto/ +COMMENT= Easy Python API for strong encryption +#LICENSE= gnu-gpl-v? + +DEPENDS+= ${PYPKGPREFIX}-crypto-[0-9]*:../../security/py-crypto + +USE_LANGUAGES= # empty + +EGG_NAME= ${DISTNAME:R} + +.include "../../lang/python/distutils.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/security/py-ezPyCrypto/PLIST b/security/py-ezPyCrypto/PLIST new file mode 100644 index 00000000000..a158f0e38e9 --- /dev/null +++ b/security/py-ezPyCrypto/PLIST @@ -0,0 +1,5 @@ +@comment $NetBSD: PLIST,v 1.1 2014/04/07 12:36:38 obache Exp $ +${PYSITELIB}/${EGG_FILE} +${PYSITELIB}/ezPyCrypto.py +${PYSITELIB}/ezPyCrypto.pyc +${PYSITELIB}/ezPyCrypto.pyo diff --git a/security/py-ezPyCrypto/distinfo b/security/py-ezPyCrypto/distinfo new file mode 100644 index 00000000000..bde379f6cda --- /dev/null +++ b/security/py-ezPyCrypto/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2014/04/07 12:36:38 obache Exp $ + +SHA1 (ezPyCrypto-0.1.1.tar.gz) = 9c488be4b9d0d59234339950a313b8aca2ec1fe3 +RMD160 (ezPyCrypto-0.1.1.tar.gz) = 689458ef5b2c4f2ef79c28c56589deb938b0ec75 +Size (ezPyCrypto-0.1.1.tar.gz) = 1392693 bytes +SHA1 (patch-ezPyCrypto.py) = 2db4ec17b11ae30f19ce075e086406fcf18b937b diff --git a/security/py-ezPyCrypto/patches/patch-ezPyCrypto.py b/security/py-ezPyCrypto/patches/patch-ezPyCrypto.py new file mode 100644 index 00000000000..801476ce8fc --- /dev/null +++ b/security/py-ezPyCrypto/patches/patch-ezPyCrypto.py @@ -0,0 +1,60 @@ +$NetBSD: patch-ezPyCrypto.py,v 1.1 2014/04/07 12:36:38 obache Exp $ + +* IDEA and RC5 had been removed from pycrypto 2.1.0alpha1 + +--- ezPyCrypto.py.orig 2003-07-23 23:03:43.000000000 +0000 ++++ ezPyCrypto.py +@@ -25,7 +25,7 @@ Features: + - Export private keys with a different (or no) passphrase + - Sensible defaults - no need to specify a zillion options (or any options + at all) unless you want to +- - Algorithms include RSA, ElGamal, DSA, ARC2, Blowfish, CAST, DES3, IDEA and RC5 ++ - Algorithms include RSA, ElGamal, DSA, ARC2, Blowfish, CAST and DES3 + (default RSA and Blowfish) + - Choose your own public and session key sizes (or accept defaults) + +@@ -69,7 +69,7 @@ import Crypto + from Crypto.PublicKey import ElGamal, DSA, RSA + from Crypto.Util.randpool import RandomPool + from Crypto.Util.number import getPrime +-from Crypto.Cipher import ARC2, Blowfish, CAST, DES3, IDEA, RC5 ++from Crypto.Cipher import ARC2, Blowfish, CAST, DES3 + from Crypto.Hash import MD5 + + #@-body +@@ -168,13 +168,13 @@ class key: + _algosPub1 = {ElGamal:'ElGamal', RSA:'RSA'} + + _algosSes = { "ARC2":ARC2, "Blowfish":Blowfish, "CAST":CAST, +- "DES3":DES3, "IDEA":IDEA, "RC5":RC5} +- _algosSes1 = {'ARC2':0, 'Blowfish':1, 'CAST':2, 'DES3':3, 'IDEA':4, 'RC5':5} ++ "DES3":DES3} ++ _algosSes1 = {'ARC2':0, 'Blowfish':1, 'CAST':2, 'DES3':3} + +- _algosSes2 = [ARC2, Blowfish, CAST, DES3, IDEA, RC5] ++ _algosSes2 = [ARC2, Blowfish, CAST, DES3] + + _algosSes3 = {ARC2:'ARC2', Blowfish:'Blowfish', CAST:'CAST', +- DES3:'DES3', IDEA:'IDEA', RC5:'RC5'} ++ DES3:'DES3'} + + # Generate IV for passphrase encryption + _passIV = "w8Z4(51fKH#p{!29Q05HWcb@K 6(1qdyv{9|4=+gvji$chw!9$38^2cyGK#;}'@DHx%3)q_skvh4#0*=" +@@ -201,7 +201,7 @@ class key: + 1. If new keys are desired: + - key size in bits (int), default 512 - advise at least 1536 + - algoPub - either 'RSA' or 'ElGamal' (default 'RSA') +- - algoSess - one of 'ARC2', 'Blowfish', 'CAST', 'DES3', 'IDEA', 'RC5', ++ - algoSess - one of 'ARC2', 'Blowfish', 'CAST', 'DES3', + (default 'Blowfish') + 2. If importing an existing key or keypair: + - keyobj (string) - result of a prior exportKey() call +@@ -231,7 +231,7 @@ class key: + algoS = self._algosSes.get(algoSess, None) + if algoS == None: + # Whoops - don't know that session algorithm +- raise Exception("AlgoSess must be one of AES/ARC2/Blowfish/CAST/DES/DES3/IDEA/RC5") ++ raise Exception("AlgoSess must be one of AES/ARC2/Blowfish/CAST/DES/DES3") + self.algoSes = algoS + self.algoSname = algoSess + |