summaryrefslogtreecommitdiff
path: root/otp2289/generator.py
diff options
context:
space:
mode:
authorSimeon Simeonov2020-04-07 13:15:09 +0200
committerSimeon Simeonov2020-04-07 13:15:09 +0200
commit719ad614ecb9e470fde7b54874a8da50df88519e (patch)
treea93502147b07ee9feb44495fad3bd0a22dbe8e8b /otp2289/generator.py
parent49b1c3e2cfb9b0224712e6891a12950f725c3b13 (diff)
Add __repr__ for OTPState and OTPGenerator
Diffstat (limited to 'otp2289/generator.py')
-rw-r--r--otp2289/generator.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/otp2289/generator.py b/otp2289/generator.py
index 4623dc0..723ed04 100644
--- a/otp2289/generator.py
+++ b/otp2289/generator.py
@@ -333,6 +333,11 @@ class OTPGenerator:
333 'Password must be longer than 10 bytes') 333 'Password must be longer than 10 bytes')
334 self._password = password 334 self._password = password
335 335
336 def __repr__(self):
337 """repr implementation"""
338 return (f'{self.__class__} at {id(self)} (seed={self._seed}, '
339 f'hash_algo={self._hash_algo})')
340
336 @staticmethod 341 @staticmethod
337 def bit_pair_sum(bit_stream): 342 def bit_pair_sum(bit_stream):
338 """ 343 """