<commit_before>Rehash: Resumable Hashlib
=========================

**Rehash** is a resumable interface to the OpenSSL-based hashers in
 the CPython ``hashlib`` standard library. **Rehash** provides hashers
 that can be pickled, reconstituted from their ``repr()``, and
 otherwise serialized. The rest of the **Rehash** API is identical to
 ``hashlib``.

**Rehash** hashers can be used to checkpoint and restore progress
when hashing large byte streams::

  import pickle, rehash
  hasher = rehash.sha256(b"foo")
  state = pickle.dumps(hasher)

  hasher2 = pickle.loads(state)
  hasher2.update(b"bar")

  assert hasher2.hexdigest() == rehash.sha256(b"foobar").hexdigest()

.. admonition:: Non-openssl hashers

  ``sha3`` and ``blake2`` hash algorithms in Python 3.6 are not OpenSSL-based and not supported by rehash.

.. admonition:: PyPy

  PyPy uses its own hasher implementations. Those are not serializable using rehash.

Links
-----
* `Project home page (GitHub) <https://github.com/kislyuk/rehash>`_
* `Documentation (Read the Docs) <https://rehash.readthedocs.io/en/latest/>`_
* `Package distribution (PyPI) <https://pypi.python.org/pypi/rehash>`_
* `Change log <https://github.com/kislyuk/rehash/blob/master/Changes.rst>`_

Bugs
~~~~
Please report bugs, issues, feature requests, etc. on `GitHub <https://github.com/kislyuk/rehash/issues>`_.

License<commit_msg>Readme formatting<commit_after>Rehash: Resumable Hashlib
=========================

Rehash is a resumable interface to the OpenSSL-based hashers in the
CPython ``hashlib`` standard library. **Rehash** provides hashers that
can be pickled, reconstituted from their ``repr()``, and otherwise
serialized. The rest of the **Rehash** API is identical to
``hashlib``.

Rehash hashers can be used to checkpoint and restore progress
when hashing large byte streams::

  import pickle, rehash
  hasher = rehash.sha256(b"foo")
  state = pickle.dumps(hasher)

  hasher2 = pickle.loads(state)
  hasher2.update(b"bar")

  assert hasher2.hexdigest() == rehash.sha256(b"foobar").hexdigest()

.. admonition:: Non-openssl hashers

  ``sha3`` and ``blake2`` hash algorithms in Python 3.6 are not OpenSSL-based and not supported by rehash.

.. admonition:: PyPy

  PyPy uses its own hasher implementations. Those are not serializable using rehash.

Links
-----
* `Project home page (GitHub) <https://github.com/kislyuk/rehash>`_
* `Documentation (Read the Docs) <https://rehash.readthedocs.io/en/latest/>`_
* `Package distribution (PyPI) <https://pypi.python.org/pypi/rehash>`_
* `Change log <https://github.com/kislyuk/rehash/blob/master/Changes.rst>`_

Bugs
~~~~
Please report bugs, issues, feature requests, etc. on `GitHub <https://github.com/kislyuk/rehash/issues>`_.

License
{'fraction_non_alphanumeric': 0.14641288433382138, 'fraction_numerical': 0.00951683748169839, 'mean_word_length': 4.765822784810126, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '161911', 'n_tokens_mistral': 939, 'n_tokens_neox': 877, 'n_words': 266}