(self, password, encoded)
| 436 | } |
| 437 | |
| 438 | def verify(self, password, encoded): |
| 439 | argon2 = self._load_library() |
| 440 | algorithm, rest = encoded.split("$", 1) |
| 441 | assert algorithm == self.algorithm |
| 442 | try: |
| 443 | return argon2.PasswordHasher().verify("$" + rest, password) |
| 444 | except argon2.exceptions.VerificationError: |
| 445 | return False |
| 446 | |
| 447 | def safe_summary(self, encoded): |
| 448 | decoded = self.decode(encoded) |