diff -rN -u old-pycryptopp/pycryptopp/cipher/aesmodule.cpp new-pycryptopp/pycryptopp/cipher/aesmodule.cpp
|
old
|
new
|
|
| 9 | 9 | #endif |
| 10 | 10 | |
| 11 | 11 | /* from Crypto++ */ |
| 12 | | #include "modes.h" |
| 13 | | #include "aes.h" |
| | 12 | #include <cryptopp/modes.h> |
| | 13 | #include <cryptopp/aes.h> |
| 14 | 14 | |
| 15 | 15 | static char aes__doc__[] = "\ |
| 16 | 16 | aes counter mode cipher\ |
diff -rN -u old-pycryptopp/pycryptopp/hash/sha256module.cpp new-pycryptopp/pycryptopp/hash/sha256module.cpp
|
old
|
new
|
|
| 9 | 9 | #endif |
| 10 | 10 | |
| 11 | 11 | /* from Crypto++ */ |
| 12 | | #include "sha.h" |
| 13 | | #include "hex.h" |
| 14 | | #include "filters.h" |
| | 12 | #include <cryptopp/sha.h> |
| | 13 | #include <cryptopp/hex.h> |
| | 14 | #include <cryptopp/filters.h> |
| 15 | 15 | |
| 16 | 16 | static char sha256__doc__[] = "\ |
| 17 | 17 | sha256 hash function\ |
diff -rN -u old-pycryptopp/pycryptopp/publickey/ecdsamodule.cpp new-pycryptopp/pycryptopp/publickey/ecdsamodule.cpp
|
old
|
new
|
|
| 15 | 15 | #endif |
| 16 | 16 | |
| 17 | 17 | /* from Crypto++ */ |
| 18 | | #include "filters.h" |
| 19 | | #include "osrng.h" |
| 20 | | #include "eccrypto.h" |
| 21 | | #include "oids.h" |
| | 18 | #include <cryptopp/filters.h> |
| | 19 | #include <cryptopp/osrng.h> |
| | 20 | #include <cryptopp/eccrypto.h> |
| | 21 | #include <cryptopp/oids.h> |
| 22 | 22 | |
| 23 | 23 | USING_NAMESPACE(CryptoPP) |
| 24 | 24 | |
diff -rN -u old-pycryptopp/pycryptopp/publickey/rsamodule.cpp new-pycryptopp/pycryptopp/publickey/rsamodule.cpp
|
old
|
new
|
|
| 12 | 12 | #endif |
| 13 | 13 | |
| 14 | 14 | /* from Crypto++ */ |
| 15 | | #include "filters.h" |
| 16 | | #include "osrng.h" |
| 17 | | #include "pssr.h" |
| 18 | | #include "rsa.h" |
| | 15 | #include <cryptopp/filters.h> |
| | 16 | #include <cryptopp/osrng.h> |
| | 17 | #include <cryptopp/pssr.h> |
| | 18 | #include <cryptopp/rsa.h> |
| 19 | 19 | |
| 20 | 20 | USING_NAMESPACE(CryptoPP) |
| 21 | 21 | |
diff -rN -u old-pycryptopp/setup.py new-pycryptopp/setup.py
|
old
|
new
|
|
| 6 | 6 | # Author: Zooko Wilcox-O'Hearn |
| 7 | 7 | # See README.txt for licensing information. |
| 8 | 8 | |
| 9 | | import os, platform, re, subprocess, sys |
| | 9 | import os, re, sys |
| 10 | 10 | |
| 11 | 11 | try: |
| 12 | 12 | from ez_setup import use_setuptools |
| … |
… |
|
| 18 | 18 | |
| 19 | 19 | from setuptools import Extension, find_packages, setup |
| 20 | 20 | |
| 21 | | CRYPTOPPDIR=os.path.join('cryptopp', 'c5') |
| 22 | | |
| 23 | 21 | extra_compile_args=[] |
| 24 | 22 | extra_link_args=[] |
| 25 | 23 | define_macros=[] |
| 26 | 24 | undef_macros=[] |
| 27 | | libraries=[] |
| | 25 | libraries=['cryptopp'] |
| 28 | 26 | ext_modules=[] |
| 29 | | include_dirs=[CRYPTOPPDIR] |
| | 27 | include_dirs=['/usr/include/cryptopp'] |
| 30 | 28 | library_dirs=[] |
| 31 | 29 | |
| 32 | | # Versions of GNU assembler older than 2.10 do not understand the kind of ASM that Crypto++ uses. |
| 33 | | sp = subprocess.Popen(['as', '-v'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) |
| 34 | | sp.stdin.close() |
| 35 | | sp.wait() |
| 36 | | if re.search("GNU assembler version (0|1|2.0)", sp.stderr.read()): |
| 37 | | define_macros.append(('CRYPTOPP_DISABLE_ASM', 1)) |
| 38 | | |
| 39 | | if 'sunos' in platform.system().lower(): |
| 40 | | extra_compile_args.append('-Wa,--divide') # allow use of "/" operator |
| 41 | | |
| 42 | | cryptopp_src = [ os.path.join(CRYPTOPPDIR, x) for x in os.listdir(CRYPTOPPDIR) if x.endswith('.cpp') ] |
| 43 | 30 | |
| 44 | 31 | trove_classifiers=[ |
| 45 | 32 | "Environment :: Console", |
| … |
… |
|
| 78 | 65 | raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,)) |
| 79 | 66 | |
| 80 | 67 | ext_modules.append( |
| 81 | | Extension('pycryptopp.publickey.rsa', cryptopp_src + ['pycryptopp/publickey/rsamodule.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| | 68 | Extension('pycryptopp.publickey.rsa', ['pycryptopp/publickey/rsamodule.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| 82 | 69 | ) |
| 83 | 70 | |
| 84 | 71 | ext_modules.append( |
| 85 | | Extension('pycryptopp.publickey.ecdsa', cryptopp_src + ['pycryptopp/publickey/ecdsamodule.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| | 72 | Extension('pycryptopp.publickey.ecdsa', ['pycryptopp/publickey/ecdsamodule.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| 86 | 73 | ) |
| 87 | 74 | |
| 88 | 75 | ext_modules.append( |
| 89 | | Extension('pycryptopp.hash.sha256', cryptopp_src + ['pycryptopp/hash/sha256module.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| | 76 | Extension('pycryptopp.hash.sha256', ['pycryptopp/hash/sha256module.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| 90 | 77 | ) |
| 91 | 78 | |
| 92 | 79 | ext_modules.append( |
| 93 | | Extension('pycryptopp.cipher.aes', cryptopp_src + ['pycryptopp/cipher/aesmodule.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| | 80 | Extension('pycryptopp.cipher.aes', ['pycryptopp/cipher/aesmodule.cpp',], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, define_macros=define_macros, undef_macros=undef_macros) |
| 94 | 81 | ) |
| 95 | 82 | |
| 96 | 83 | miscdeps=os.path.join(os.getcwd(), 'misc', 'dependencies') |