aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/python/botan2.py8
-rw-r--r--src/scripts/test_python.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/python/botan2.py b/src/python/botan2.py
index 715a60627..273fe3f46 100755
--- a/src/python/botan2.py
+++ b/src/python/botan2.py
@@ -1347,12 +1347,12 @@ class HOTP(object):
return code.value
def check(self, code, counter, resync_range=0):
- next = c_uint64(0)
- rc = botan.botan_hotp_check(self.__obj, byref(next), code, counter, resync_range)
+ next_ctr = c_uint64(0)
+ rc = botan.botan_hotp_check(self.__obj, byref(next_ctr), code, counter, resync_range)
if rc == 0:
- return (True,next.value)
+ return (True, next_ctr.value)
else:
- return (False,counter)
+ return (False, counter)
# Typedefs for compat with older versions
cipher = SymmetricCipher # pylint: disable=invalid-name
diff --git a/src/scripts/test_python.py b/src/scripts/test_python.py
index b9124a9df..3f8d00849 100644
--- a/src/scripts/test_python.py
+++ b/src/scripts/test_python.py
@@ -348,10 +348,10 @@ class BotanPythonTests(unittest.TestCase):
self.assertEqual(hotp.generate(1), 287082)
self.assertEqual(hotp.generate(9), 520489)
- self.assertEqual(hotp.check(520489, 8), (False,8))
- self.assertEqual(hotp.check(520489, 8, 1), (True,10))
- self.assertEqual(hotp.check(520489, 7, 2), (True,10))
- self.assertEqual(hotp.check(520489, 0, 9), (True,10))
+ self.assertEqual(hotp.check(520489, 8), (False, 8))
+ self.assertEqual(hotp.check(520489, 8, 1), (True, 10))
+ self.assertEqual(hotp.check(520489, 7, 2), (True, 10))
+ self.assertEqual(hotp.check(520489, 0, 9), (True, 10))
if __name__ == '__main__':