Home
last modified time | relevance | path

Searched refs:digestmod (Results 1 – 10 of 10) sorted by relevance

/third_party/python/Lib/
Dhmac.py38 def __init__(self, key, msg=None, digestmod=''): argument
55 if not digestmod:
58 if _hashopenssl and isinstance(digestmod, (str, _functype)):
60 self._init_hmac(key, msg, digestmod)
62 self._init_old(key, msg, digestmod)
64 self._init_old(key, msg, digestmod)
66 def _init_hmac(self, key, msg, digestmod): argument
67 self._hmac = _hashopenssl.hmac_new(key, msg, digestmod=digestmod)
71 def _init_old(self, key, msg, digestmod): argument
72 if callable(digestmod):
[all …]
/third_party/python/Lib/test/
Dtest_hmac.py54 h = hmac.HMAC(key, data, digestmod=hashfunc)
59 h = hmac.HMAC(key, data, digestmod=hashname)
64 h = hmac.HMAC(key, digestmod=hashname)
70 h = hmac.new(key, data, digestmod=hashname)
75 h = hmac.new(key, None, digestmod=hashname)
79 h = hmac.new(key, digestmod=hashname)
83 h = hmac.new(key, data, digestmod=hashfunc)
96 h._init_old(key, data, digestmod=hashname)
102 h = c_hmac_new(key, data, digestmod=hashname)
107 h = c_hmac_new(key, digestmod=hashname)
[all …]
/third_party/python/Doc/library/
Dhmac.rst17 .. function:: new(key, msg=None, digestmod='')
21 *digestmod* is the digest name, digest constructor or module for the HMAC
28 Parameter *digestmod* can be the name of a hash algorithm.
31 MD5 as implicit default digest for *digestmod* is deprecated.
32 The digestmod parameter is now required. Pass it as a keyword
Dhashlib.rst550 >>> m = hmac.new(b'secret key', digestmod=hashlib.blake2s)
/third_party/python/Modules/
D_hashopenssl.c376 py_digest_by_digestmod(PyObject *module, PyObject *digestmod, enum Py_hash_type py_ht) { in py_digest_by_digestmod() argument
381 if (PyUnicode_Check(digestmod)) { in py_digest_by_digestmod()
382 name_obj = digestmod; in py_digest_by_digestmod()
386 name_obj = PyDict_GetItem(state->constructs, digestmod); in py_digest_by_digestmod()
393 "Unsupported digestmod %R", digestmod); in py_digest_by_digestmod()
1491 PyObject *digestmod) in _hashlib_hmac_new_impl() argument
1506 if (digestmod == NULL) { in _hashlib_hmac_new_impl()
1512 digest = py_digest_by_digestmod(module, digestmod, Py_ht_mac); in _hashlib_hmac_new_impl()
/third_party/python/Modules/clinic/
D_hashopenssl.c.h1142 PyObject *digestmod);
1154 PyObject *digestmod = NULL; in _hashlib_hmac_new() local
1176 digestmod = args[2]; in _hashlib_hmac_new()
1178 return_value = _hashlib_hmac_new_impl(module, &key, msg_obj, digestmod); in _hashlib_hmac_new()
/third_party/python/Doc/whatsnew/
D3.4.rst925 The *digestmod* argument to the :func:`hmac.new` function may now be any hash
927 which the value of *digestmod* defaults to ``MD5`` is deprecated: in a
2110 * ``MD5`` as the default *digestmod* for the :func:`hmac.new` function is
2112 *digestmod* argument.
2446 * Since the *digestmod* argument to the :func:`hmac.new` function will in the
2448 explicitly specify a *digestmod* (:issue:`17276`).
/third_party/python/Misc/NEWS.d/
D3.10.0a7.rst394 The :mod:`hmac` module now uses OpenSSL's HMAC implementation when digestmod
D3.9.0a1.rst1308 when the digestmod parameter, now required in 3.8, is omitted. Also
/third_party/python/Misc/
DHISTORY3362 - Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
3363 module supports digestmod names, e.g. hmac.HMAC('sha1').