From d0157129c070fc146f15bb24776873f5fa9b25a6 Mon Sep 17 00:00:00 2001 From: Aliwoto Date: Sat, 5 Nov 2022 00:38:30 +0330 Subject: [PATCH] Fix wrong usage of __SIG_CHARS attr in calculate_signature method. Fixes #1. Upgrade version to 0.0.25. Signed-off-by: Aliwoto --- pyproject.toml | 2 +- wotoplatform/__init__.py | 2 +- wotoplatform/utils/woto_crypto/password_container.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4256a24..5fa04e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wotoplatform" -version = "0.0.24" +version = "0.0.25" description = "" authors = ["AliWoto "] packages = [ diff --git a/wotoplatform/__init__.py b/wotoplatform/__init__.py index 591ea3a..5fb013a 100644 --- a/wotoplatform/__init__.py +++ b/wotoplatform/__init__.py @@ -68,7 +68,7 @@ ResolveUsernameData, ) -__version__ = '0.0.24' +__version__ = '0.0.25' log = logging.getLogger(__name__) class WotoClient(ClientBase): diff --git a/wotoplatform/utils/woto_crypto/password_container.py b/wotoplatform/utils/woto_crypto/password_container.py index a63cce3..6a984d1 100644 --- a/wotoplatform/utils/woto_crypto/password_container.py +++ b/wotoplatform/utils/woto_crypto/password_container.py @@ -36,7 +36,7 @@ def calculate_signature(self, user_input: str) -> None: self.signature = self.__append_by_seps(user_input, self.__SIG_CHARS, True) if len(self.signature)%2 == 1: # See: https://github.com/TheGolangHub/wotoCrypto/blob/4877c7c9925871013917a8c300bef9bd2a73d4b5/wotoCrypto/passContainer/methods.go#L15 - self.signature += self.__SIG_CHARS[0x00] + self.signature += chr(self.__SIG_CHARS[0x00]) def calculate_hash(self, user_input: str) -> None: self.hash256 = hashlib.sha256(user_input.encode()).hexdigest()