Beispiel #1
0
 def verify(self, hotp, counter):
     if not constant_time.bytes_eq(self.generate(counter), hotp):
         raise InvalidToken("Supplied HOTP value does not match.")
Beispiel #2
0
 def verify(self, totp: bytes, time: int) -> None:
     if not constant_time.bytes_eq(self.generate(time), totp):
         raise InvalidToken("Supplied TOTP value does not match.")