summaryrefslogtreecommitdiff
path: root/src/hash_template.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve C extension autodocsDwayne Litzenberger2013-07-141-13/+73
| | | | | | | | - Add __all__ to C cipher & hash modules - Update hash module docstrings to document the block_size and digest_size variables. Closes: https://bugs.launchpad.net/pycrypto/+bug/1179255
* Py3k cleanup: Module initializationDwayne Litzenberger2013-07-141-12/+22
|
* Py3k cleanup: Always use tp_getattroDwayne Litzenberger2013-07-141-23/+12
|
* Py3k cleanup: PyMODINIT_FUNCDwayne Litzenberger2013-07-141-4/+0
|
* Py3k cleanup: PyVarObject_HEAD_INITDwayne Litzenberger2013-07-141-5/+0
|
* Py3k cleanup: PyType_ReadyDwayne Litzenberger2013-07-141-2/+3
|
* Py3k cleanup: staticforward and Py_TYPEDwayne Litzenberger2013-07-141-4/+0
|
* Py3k cleanup: PyModule_AddIntConstantDwayne Litzenberger2013-07-141-7/+0
|
* Py3k cleanup: Remove unused is_ALGobject macroDwayne Litzenberger2013-07-141-2/+0
|
* Py3k cleanup: Define PyInt_FromLong for Python 3.x and use itDwayne Litzenberger2013-07-141-2/+1
| | | | | | This is the first of a series of changes that aims to reduce code duplication between the Python 3 and Python 2 versions of the C extensions.
* Add pycrypto_common.h and clean up a bunch of miscellaneous includes & typedefsDwayne Litzenberger2013-04-211-7/+1
|
* Hash: Speed up initialization by removing pure-Python wrappershash-speedup-wipDwayne Litzenberger2013-02-171-11/+11
| | | | | | | | | | | | The pure Python wrappers around Crypto.Hash.* were convenient, but they slowed down hash initialization by 4-7x. There is a speed trade-off here: The MD5 and SHA1 objects are just wrapped hashlib objects (or old-style md5/sha objects). To maintain API compatibility with the rest of PyCrypto, we still have to wrap them, so they're slower to initialize than the rest of the hash functions. If hashlib ever adds a .new() method, we will automatically use hashlib directly and gain the initialization speed-up.
* Hash: Remove "oid" attributes; add "name" attributeDwayne Litzenberger2013-02-171-0/+4
| | | | | | | | | | | | In PyCrypto v2.5, the "oid" attribute was added to hash objects. In retrospect, this was not a good idea, since the OID is not really a property of the hash algorithm, it's a protocol-specific identifer for the hash functions. PKCS#1 v1.5 uses it, but other protocols (e.g. OpenPGP, DNSSEC, SSH, etc.) use different identifiers, and it doesn't make sense to add these to Crypto.Hash.* every time a new algorithm is added. This also has the benefit of being compatible with the Python standard library's "hashlib" objects, which also have a name attribute.
* Fix compiler warning about "_POSIX_C_SOURCE" being redefined in string.hDwayne Litzenberger2013-02-171-1/+1
| | | | The solution is to include Python.h before string.h is included.
* Fixed compilation error in MSVC.alsaan2011-11-291-7/+6
|
* Merged from upstream (py3k support) and modified so that all unit tests pass.Legrandin2011-10-181-22/+117
|\
| * Merge branch 'master' into py3kDwayne C. Litzenberger2011-10-101-0/+1
| |\ | | | | | | | | | | | | | | | Conflicts: setup.py src/_fastmath.c
| * | Changes to allow pycrpyto to work on Python 3.x as well as 2.1 through 2.7Thorsten Behrens2010-12-281-24/+117
| | |
* | | Added Lorenz Quack's native C implementation of all SHA-2 algorithmLegrandin2011-10-161-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | (as submitted here https://bugs.launchpad.net/pycrypto/+bug/544792) so that they are available also in Python 2.1, 2.2, 2.3 and 2.4. Regardless where the implementation comes from (Python standard library or our native modules, depending on the Python version), all Crypto.Hash objects are always used as front-ends.
* | | Merged with upstream.Legrandin2011-09-201-0/+1
|\ \ \ | | |/ | |/|
| * | Add variable block size support to HMAC-SHA384 and HMAC-SHA512 which useFrédéric Bertolus2011-04-081-0/+1
| |/ | | | | | | block of 128 bytes long
* | Add new() method to all remaining hash algorithms, so as to make them to ↵Legrandin2011-02-071-0/+6
| | | | | | | | work with PKCS#1 PSS. Add also test cases for it for every hash.
* | Add OID to each hash algorithm.Legrandin2011-02-031-1/+7
|/
* Release the global interpreter lock during encryption, decryption, and hashing.Dwayne C. Litzenberger2009-10-121-1/+6
| | | | | | | These are the easy ones. We don't release the GIL on cipher initialization, hash initialization, or hash finalization, because those functions might make Python API calls, and we would need to add a mechism for re-acquiring the GIL in those cases.
* {block,stream,hash}_template.c: Replace the legal noticesDwayne C. Litzenberger2009-08-031-5/+18
| | | | I have permission to do this. See the LEGAL directory.
* [project @ robey@lag.net-20060815024756-0ee4d018bde70abe]Robey Pointer2006-08-141-2/+2
| | | | fix a few gcc warnings about signed/unsigned char and system-header-defined macros
* [project @ akuchling-20020525014711-0542d6c0170548df]akuchling2002-05-241-1/+3
| | | | | | | [project @ 2002-05-24 18:47:11 by akuchling] Overwriting the object is safe in Python 2.2, but not in Python 2.1 because _PyObject_Del() looks at the type pointer to see if the type is GCed or not. Instead, just zap the hash and stream cipher states.
* [project @ akuchling-20020524234241-bc4dc6959b6bf706]akuchling2002-05-241-1/+1
| | | | | [project @ 2002-05-24 16:42:41 by akuchling] Oops: PyObject_Del is actually the name to use
* [project @ akuchling-20020524225121-d7c667dfcda3cee8]akuchling2002-05-241-2/+2
| | | | | [project @ 2002-05-24 15:51:21 by akuchling] Use canonical functions for allocating/deallocating objects
* [project @ akuchling-20020523211022-16b9d8b39f46fb87]akuchling2002-05-231-6/+2
| | | | | [project @ 2002-05-23 14:10:21 by akuchling] Use memset() in deallocators
* [project @ akuchling-20020523210259-f80d7b91276c43b2]akuchling2002-05-231-2/+7
| | | | | [project @ 2002-05-23 14:02:58 by akuchling] Make the deallocators consistent
* [project @ akuchling-20020517204456-366350487889f006]akuchling2002-05-171-34/+41
| | | | | | | | | | | [project @ 2002-05-17 13:44:55 by akuchling] Massive C code cleanups: * Improve error messages and docstrings * Use memory allocation API correctly * Remove uses of PyArg_NoArgs * Use Python-style code formatting, and make the style more consistent There's likely still more work to be done here.
* [project @ akuchling-20020517032843-d46b1f26cebb9fb8]akuchling2002-05-161-7/+5
| | | | | [project @ 2002-05-16 20:28:43 by akuchling] Re-indent into Python C style; no other changes
* [project @ akuchling-20020404014253-9c6258770f7878c8]akuchling2002-04-031-28/+0
| | | | | [project @ 2002-04-03 17:42:53 by akuchling] Remove cruft
* [project @ akuchling-20020404012808-0f5d2e4b5c86f7af]akuchling2002-04-031-13/+8
| | | | | | [project @ 2002-04-03 17:28:08 by akuchling] Use ANSI prototypes Fix the evil stringizing macros
* [project @ akuchling-20020404011641-90da0424394474e4]akuchling2002-04-031-5/+0
| | | | | [project @ 2002-04-03 17:16:41 by akuchling] Remove block_size attribute
* [project @ akuchling-20020404011254-dc4b19345e770837]akuchling2002-04-031-78/+71
| | | | | [project @ 2002-04-03 17:12:54 by akuchling] Get MD4 module compiling again
* [project @ akuchling-20020402062257-faae089f7242b990]akuchling2002-04-011-0/+285
[project @ 2002-04-01 22:22:55 by akuchling] Add templates to src/ directory