Skip to content

Commit

Permalink
chore: added base hashtype
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jul 9, 2023
1 parent d0cc0f4 commit c5971d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/netius/auth/base.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
from typing import Literal

HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"]

class Auth(object):
@classmethod
def verify(cls, encoded: str, decoded: str) -> bool: ...

@classmethod
def generate(cls, password: str, type: Literal["md5", "sha1", "sha256", "sha512"] = "sha256", salt: str = "netius") -> str: ...
def generate(cls, password: str, type: HashType = "sha256", salt: str = "netius") -> str: ...

@classmethod
def unpack(cls, password: str) -> tuple[HashType, str, str, str]: ...

0 comments on commit c5971d2

Please sign in to comment.