From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 15 Jul 2025 12:10:10 +0000 (+0200) Subject: [3.13] gh-72570: mention the incompatibility of XOFs with HMAC (GH-136676) (#136679) X-Git-Tag: v3.13.6~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8517a890cf0437e9ab79ab833dfdd9b56b7c3100;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-72570: mention the incompatibility of XOFs with HMAC (GH-136676) (#136679) gh-72570: mention the incompatibility of XOFs with HMAC (GH-136676) (cherry picked from commit a02cf19deed353d1e0e7564468f10aced61c12e8) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst index d6692033b2d4..57076c38086c 100644 --- a/Doc/library/hmac.rst +++ b/Doc/library/hmac.rst @@ -12,6 +12,9 @@ -------------- This module implements the HMAC algorithm as described by :rfc:`2104`. +The interface allows to use any hash function with a *fixed* digest size. +In particular, extendable output functions such as SHAKE-128 or SHAKE-256 +cannot be used with HMAC. .. function:: new(key, msg=None, digestmod)