summaryrefslogtreecommitdiff
path: root/Doc/library/hashlib.rst
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-06 22:03:25 +0200
committerChristian Heimes <christian@python.org>2016-09-06 22:03:25 +0200
commit121b9487d13b7dcd5a864a6067c4a5c88ba15b5d (patch)
treeb2ac9866afda319cb6582de045c47f1a023d1973 /Doc/library/hashlib.rst
parent5d75f441ef0a3cfe7af0d865db2530528e424818 (diff)
downloadcpython-git-121b9487d13b7dcd5a864a6067c4a5c88ba15b5d.tar.gz
Issue #26798: Add BLAKE2 (blake2b and blake2s) to hashlib.
Diffstat (limited to 'Doc/library/hashlib.rst')
-rw-r--r--Doc/library/hashlib.rst14
1 files changed, 13 insertions, 1 deletions
diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index cf6b8fff68..6ca53071ed 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'``::
@@ -243,6 +247,12 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
.. versionadded:: 3.6
+BLAKE2
+------
+
+BLAKE2 takes additional arguments, see :ref:`hashlib-blake2`.
+
+
.. seealso::
Module :mod:`hmac`
@@ -251,6 +261,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.