(self, encoded)
| 458 | } |
| 459 | |
| 460 | def must_update(self, encoded): |
| 461 | decoded = self.decode(encoded) |
| 462 | current_params = decoded["params"] |
| 463 | new_params = self.params() |
| 464 | # Set salt_len to the salt_len of the current parameters because salt |
| 465 | # is explicitly passed to argon2. |
| 466 | new_params.salt_len = current_params.salt_len |
| 467 | update_salt = must_update_salt(decoded["salt"], self.salt_entropy) |
| 468 | return (current_params != new_params) or update_salt |
| 469 | |
| 470 | def harden_runtime(self, password, encoded): |
| 471 | # The runtime for Argon2 is too complicated to implement a sensible |
nothing calls this directly
no test coverage detected