| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
- 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The solution is to include Python.h before string.h is included.
|
| |
|
|\ |
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
setup.py
src/_fastmath.c
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(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.
|
|\ \ \
| | |/
| |/| |
|
| |/
| |
| |
| | |
block of 128 bytes long
|
| |
| |
| |
| | |
work with PKCS#1 PSS. Add also test cases for it for every hash.
|
|/ |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
I have permission to do this. See the LEGAL directory.
|
|
|
|
| |
fix a few gcc warnings about signed/unsigned char and system-header-defined macros
|
|
|
|
|
|
|
| |
[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 @ 2002-05-24 16:42:41 by akuchling]
Oops: PyObject_Del is actually the name to use
|
|
|
|
|
| |
[project @ 2002-05-24 15:51:21 by akuchling]
Use canonical functions for allocating/deallocating objects
|
|
|
|
|
| |
[project @ 2002-05-23 14:10:21 by akuchling]
Use memset() in deallocators
|
|
|
|
|
| |
[project @ 2002-05-23 14:02:58 by akuchling]
Make the deallocators consistent
|
|
|
|
|
|
|
|
|
|
|
| |
[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 @ 2002-05-16 20:28:43 by akuchling]
Re-indent into Python C style; no other changes
|
|
|
|
|
| |
[project @ 2002-04-03 17:42:53 by akuchling]
Remove cruft
|
|
|
|
|
|
| |
[project @ 2002-04-03 17:28:08 by akuchling]
Use ANSI prototypes
Fix the evil stringizing macros
|
|
|
|
|
| |
[project @ 2002-04-03 17:16:41 by akuchling]
Remove block_size attribute
|
|
|
|
|
| |
[project @ 2002-04-03 17:12:54 by akuchling]
Get MD4 module compiling again
|
|
[project @ 2002-04-01 22:22:55 by akuchling]
Add templates to src/ directory
|