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

Side by Side Diff: Doc/library/hashlib.rst

Issue 26798: add BLAKE2 to hashlib
Patch Set: Created 3 years ago
Left:
Right:
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 unified diff | Download patch
OLDNEW
1 :mod:`hashlib` --- Secure hashes and message digests 1 :mod:`hashlib` --- Secure hashes and message digests
2 ==================================================== 2 ====================================================
3 3
4 .. module:: hashlib 4 .. module:: hashlib
5 :synopsis: Secure hash and message digest algorithms. 5 :synopsis: Secure hash and message digest algorithms.
6 6
7 .. moduleauthor:: Gregory P. Smith <greg@krypto.org> 7 .. moduleauthor:: Gregory P. Smith <greg@krypto.org>
8 .. sectionauthor:: Gregory P. Smith <greg@krypto.org> 8 .. sectionauthor:: Gregory P. Smith <greg@krypto.org>
9 9
10 **Source code:** :source:`Lib/hashlib.py` 10 **Source code:** :source:`Lib/hashlib.py`
11 11
12 .. index:: 12 .. index::
13 single: message digest, MD5 13 single: message digest, MD5
14 single: secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512 14 single: secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512
15 single: blake2b, blake2s
Martin Panter 2016/09/04 15:58:52 Wouldn’t it be better to move these to the other f
15 16
16 .. testsetup:: 17 .. testsetup::
17 18
18 import hashlib 19 import hashlib
19 20
20 21
21 -------------- 22 --------------
22 23
23 This module implements a common interface to many different secure hash and 24 This module implements a common interface to many different secure hash and
24 message digest algorithms. Included are the FIPS secure hash algorithms SHA1, 25 message digest algorithms. Included are the FIPS secure hash algorithms SHA1,
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 >>> binascii.hexlify(dk) 218 >>> binascii.hexlify(dk)
218 b'0394a2ede332c9a13eb82e9b24631604c31df978b4e2f0fbd2c549944f9d79a5' 219 b'0394a2ede332c9a13eb82e9b24631604c31df978b4e2f0fbd2c549944f9d79a5'
219 220
220 .. versionadded:: 3.4 221 .. versionadded:: 3.4
221 222
222 .. note:: 223 .. note::
223 224
224 A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The 225 A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The
225 Python implementation uses an inline version of :mod:`hmac`. It is about 226 Python implementation uses an inline version of :mod:`hmac`. It is about
226 three times slower and doesn't release the GIL. 227 three times slower and doesn't release the GIL.
228
229 BLAKE2
230 ------
231
232 BLAKE2 takes additional arguments, see :ref:`hashlib-blake2`.
227 233
228 234
229 .. seealso:: 235 .. seealso::
230 236
231 Module :mod:`hmac` 237 Module :mod:`hmac`
232 A module to generate message authentication codes using hashes. 238 A module to generate message authentication codes using hashes.
233 239
234 Module :mod:`base64` 240 Module :mod:`base64`
235 Another way to encode binary hashes for non-binary environments. 241 Another way to encode binary hashes for non-binary environments.
242
243 See :ref:`hashlib-blake2`.
236 244
237 http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf 245 http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
238 The FIPS 180-2 publication on Secure Hash Algorithms. 246 The FIPS 180-2 publication on Secure Hash Algorithms.
239 247
240 https://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_ algorithms 248 https://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_ algorithms
241 Wikipedia article with information on which algorithms have known issues a nd 249 Wikipedia article with information on which algorithms have known issues a nd
242 what that means regarding their use. 250 what that means regarding their use.
243 251
244 https://www.ietf.org/rfc/rfc2898.txt 252 https://www.ietf.org/rfc/rfc2898.txt
245 PKCS #5: Password-Based Cryptography Specification Version 2.0 253 PKCS #5: Password-Based Cryptography Specification Version 2.0
OLDNEW

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