Commit graph

39 commits

Author SHA1 Message Date
Ned Batchelder
3440d197a5
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
2022-07-05 11:16:10 +02:00
Christian Heimes
db5aed931f
bpo-40791: Use CRYPTO_memcmp() for compare_digest (#20456)
hashlib.compare_digest uses OpenSSL's CRYPTO_memcmp() function
when OpenSSL is available.

Note: The _operator module is a builtin module. I don't want to add
libcrypto dependency to libpython. Therefore I duplicated the wrapper
function and added a copy to _hashopenssl.c.
2020-05-27 21:50:06 +02:00
Christian Heimes
837f9e42e3
bpo-40645: Deprecated internal details of hmac.HMAC (GH-20132) 2020-05-17 01:05:40 +02:00
Gregory P. Smith
f33c57d5c7
bpo-33604: Raise TypeError on missing hmac arg. (GH-16805)
Also updates the documentation to clarify the situation surrounding
the digestmod parameter that is required despite its position in the
argument list as of 3.8.0 as well as removing old python2 era
references to "binary strings".

We indavertently had this raise ValueError in 3.8.0 for the missing
arg.  This is not considered an API change as no reasonable code would
be catching this missing argument error in order to handle it.
2019-10-17 20:30:42 -07:00
Matthias Bussonnier
51a4743d19 bpo-33604: Remove deprecated HMAC default value marked for removal in 3.8 (GH-7063)
HMAC's digestmod was deprecated marked for removal, this removes it as planned.
2018-09-10 11:10:01 -07:00
Matthias Bussonnier
8bb0b5b03c bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062)
bpo-33604: Bump removal notice from 3.6 to 3.8 and change PendingDeprecationWarning to DeprecationWarning as we had intended to do earlier...
2018-05-22 15:55:31 -07:00
Christian Heimes
2f050c7e1b
bpo-32433: Optimized HMAC digest (#5023)
The hmac module now has hmac.digest(), which provides an optimized HMAC
digest for short messages. hmac.digest() is up to three times faster
than hmac.HMAC().digest().

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-27 09:53:43 +01:00
Martin Panter
357ed2e577 Change double hyphens (en dashes) to em (longer) dashes 2016-11-21 00:15:20 +00:00
Terry Jan Reedy
fa089b9b0b Issue #22558: Add remaining doc links to source code for Python-coded modules.
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Benjamin Peterson
d9ede872cd that this is "for Python" is obvious 2015-06-05 21:03:08 -05:00
Berker Peksag
740c730086 Issues #21948 and #16040: Fix typos. 2014-07-09 20:15:28 +03:00
Larry Hastings
3732ed2414 Merge in all documentation changes since branching 3.4.0rc1. 2014-03-15 21:13:56 -07:00
Christian Heimes
c4ab11050d Issue #18775: Add name and block_size attribute to HMAC object. They now
provide the same API elements as non-keyed cryptographic hash functions.
2013-11-20 17:35:06 +01:00
Christian Heimes
634919a9fa Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
module supports digestmod names, e.g. hmac.HMAC('sha1').
2013-11-20 17:23:06 +01:00
Georg Brandl
808ddaa3ec merge with 3.3 2013-10-06 09:49:18 +02:00
Georg Brandl
74883a3751 Fix markup to not add parens to the "hashlib.md5" constructor when the object is meant, not the call. 2013-10-06 09:48:47 +02:00
Christian Heimes
04926aeb2f Issue 18240: The HMAC module is no longer restricted to bytes and accepts
any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.
2013-07-01 13:08:42 +02:00
Ezio Melotti
c228e96726 #16518: use "bytes-like object" throughout the docs. 2013-05-04 18:06:34 +03:00
Larry Hastings
48986d68c2 Minor grammar refinement for hmac.compare_digest(). 2012-06-25 00:59:34 -07:00
Antoine Pitrou
5f762af3bc Remove a detailed discussion of content-based short circuiting, off topic for library docs. 2012-06-24 16:23:54 +02:00
Antoine Pitrou
f61e7910ea Simplify wording. 2012-06-24 16:21:10 +02:00
Antoine Pitrou
1524d7556d Formatting 2012-06-24 16:18:48 +02:00
Georg Brandl
ae64b4d8e2 Merge heads. 2012-06-24 16:11:23 +02:00
Georg Brandl
3b44d81cf9 Merge heads. 2012-06-24 16:10:47 +02:00
Georg Brandl
a1bc35f07f Improve hmac.compare_digest() docstring and documentation, courtesy of Larry H. 2012-06-24 16:07:33 +02:00
Antoine Pitrou
4f9946874b The buffer protocol doesn't exist (in the glossary anyway). 2012-06-24 16:04:38 +02:00
Antoine Pitrou
9df73dac84 Larry's suggested rewording of the compare_digest() docs. 2012-06-24 16:03:50 +02:00
Christian Heimes
6cea65555c Issue #15061: Re-implemented hmac.compare_digest() in C 2012-06-24 13:48:32 +02:00
Nick Coghlan
807770ec1b Issue #15061: Don't oversell the capabilities of the new non-shortcircuiting comparison function in hmac 2012-06-15 21:14:08 +10:00
Charles-François Natali
9b704ec9e1 Add versionadded for hmac.secure_compare(). 2012-05-15 21:00:32 +02:00
Charles-François Natali
7feb9f4225 Issue #14532: Add a secure_compare() helper to the hmac module, to mitigate
timing attacks. Patch by Jon Oberheide.
2012-05-13 19:53:07 +02:00
Georg Brandl
9701eb6e14 Closes #13944: fix capitalization of class name. 2012-02-05 09:25:22 +01:00
Raymond Hettinger
469271d4ea More source links 2011-01-27 20:38:46 +00:00
Georg Brandl
531d76b096 #5212: md5 weaknesses do not affect hmac, so remove the note about that. 2010-10-17 10:09:06 +00:00
Georg Brandl
80b75fd288 Fix hmac docs: it takes and returns bytes, except for hexdigest(). 2010-10-17 09:43:35 +00:00
Ezio Melotti
0639d5aeb6 Merged revisions 76904 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76904 | ezio.melotti | 2009-12-20 00:41:49 +0200 (Sun, 20 Dec 2009) | 1 line

  #7388: "python".capitalize() in the Doc
........
2009-12-19 23:26:38 +00:00
Georg Brandl
036490d025 More conversion to new-style optional args. 2009-05-17 13:00:36 +00:00
Georg Brandl
55ac8f0f26 Get rid of the remaining versionadded/versionchanged directives. 2007-09-01 13:51:09 +00:00
Georg Brandl
116aa62bf5 Move the 3k reST doc tree in place. 2007-08-15 14:28:22 +00:00