diff --git a/bwb/common.py b/bwb/common.py index ab562d0..e205f1d 100644 --- a/bwb/common.py +++ b/bwb/common.py @@ -174,6 +174,7 @@ class common: def init(self): self.init_secret = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(14)) + self.enc_secret = self.init_secret self.otp = OTP(self.init_secret) return self.get_pub() @@ -195,6 +196,6 @@ class common: def set_secret(self, text): shared_key = self.key.exchange(self.master_pub) derived_key = HKDF(SHA256(), length=32, salt=b'Qot.', info=None, backend=default_backend()).derive(shared_key) - secret = self.dec(text, derived_key) - self.otp = OTP(secret) + self.enc_secret = self.dec(text, derived_key) + self.otp = OTP(self.enc_secret) return True diff --git a/setup.py b/setup.py index 54e0566..3c87762 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with io.open('README.md', encoding='utf-8') as fh: long_description = fh.read() setuptools.setup(name='bwb', - version='2.1.0', + version='2.1.1', description='bwb', long_description=long_description, long_description_content_type='text/markdown',