(msg, inner=inner, outer=outer)
| 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) |
no test coverage detected