[issue18742] Abstract base class for hashlib
Christian Heimes
report at bugs.python.org
Tue Oct 22 15:54:50 CEST 2013
Christian Heimes added the comment:
I have checked in some of the basic and non-controversal parts of the PEP (optimization, expose type object). The ABCs are still missing. In order to cope with keyed and non-keyed CHF I have added a common base class for both and separate ABCs for keyed and non-keyed CHF. They are really different beasts but they provide a common API except for they constructor.
class AbstractCryptoHashFunction(metaclass=_abc.ABCMeta):
"""Common ABC for keyed and non-keyed cryptographic hash functions"""
class CryptoHashFunction(AbstractCryptoHashFunction):
"""Abstract base class for cryptographic hash functions (PEP 247)"""
class KeyedCryptoHashFunction(AbstractCryptoHashFunction):
"""Abstract base class for keyed cryptographic hashs function (PEP 247)"""
----------
Added file: http://bugs.python.org/file32302/hashlib_abc4.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18742>
_______________________________________
More information about the Python-bugs-list
mailing list