MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / prf

Function prf

tools/python-3.11.9-amd64/Lib/hashlib.py:218–225  ·  view source on GitHub ↗
(msg, inner=inner, outer=outer)

Source from the content-addressed store, hash-verified

216 outer.update(password.translate(_trans_5C))
217
218 def prf(msg, inner=inner, outer=outer):
219 # PBKDF2_HMAC uses the password as key. We can re-use the same
220 # digest objects and just update copies to skip initialization.
221 icpy = inner.copy()
222 ocpy = outer.copy()
223 icpy.update(msg)
224 ocpy.update(icpy.digest())
225 return ocpy.digest()
226
227 if iterations < 1:
228 raise ValueError(iterations)

Callers 1

pbkdf2_hmacFunction · 0.85

Calls 3

digestMethod · 0.80
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected