Skip to content

Commit

Permalink
Fix wrong usage of __SIG_CHARS attr in calculate_signature method.
Browse files Browse the repository at this point in the history
Fixes #1.
Upgrade version to 0.0.25.

Signed-off-by: Aliwoto <[email protected]>
  • Loading branch information
Aliwoto committed Nov 4, 2022
1 parent 7c50898 commit d015712
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "wotoplatform"
version = "0.0.24"
version = "0.0.25"
description = ""
authors = ["AliWoto <[email protected]>"]
packages = [
Expand Down
2 changes: 1 addition & 1 deletion wotoplatform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
ResolveUsernameData,
)

__version__ = '0.0.24'
__version__ = '0.0.25'
log = logging.getLogger(__name__)

class WotoClient(ClientBase):
Expand Down
2 changes: 1 addition & 1 deletion wotoplatform/utils/woto_crypto/password_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d015712

Please sign in to comment.