Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(80229)

Unified Diff: Doc/library/hashlib.rst

Issue 26798: add BLAKE2 to hashlib
Patch Set: Created 2 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Doc/library/hashlib-blake2.rst ('k') | Lib/hashlib.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
index f6d480897dea94823ee6babd42a7a49fbd0bdde2..105425e92445a3630667e982697f10d9cdcc7102 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -65,11 +65,15 @@ concatenation of the data fed to it so far using the :meth:`digest` or
Constructors for hash algorithms that are always present in this module are
:func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`,
-and :func:`sha512`. :func:`md5` is normally available as well, though it
+:func:`sha512`, :func:`blake2b`, and :func:`blake2s`.
+:func:`md5` is normally available as well, though it
may be missing if you are using a rare "FIPS compliant" build of Python.
Additional algorithms may also be available depending upon the OpenSSL
library that Python uses on your platform.
+.. versionadded:: 3.6
+ :func:`blake2b` and :func:`blake2s` were added.
+
For example, to obtain the digest of the byte string ``b'Nobody inspects the
spammish repetition'``::
@@ -225,6 +229,11 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
Python implementation uses an inline version of :mod:`hmac`. It is about
three times slower and doesn't release the GIL.
+BLAKE2
+------
+
+BLAKE2 takes additional arguments, see :ref:`hashlib-blake2`.
+
.. seealso::
@@ -234,6 +243,8 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
Module :mod:`base64`
Another way to encode binary hashes for non-binary environments.
+ See :ref:`hashlib-blake2`.
+
http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
The FIPS 180-2 publication on Secure Hash Algorithms.
« no previous file with comments | « Doc/library/hashlib-blake2.rst ('k') | Lib/hashlib.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+