make pep561 compliant

This commit is contained in:
Maxim Kurnikov
2018-07-29 20:19:43 +03:00
parent 89bb6eac75
commit f471b7b1bf
372 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
from collections import OrderedDict
from typing import (
Callable,
Dict,
List,
Optional,
Union,
)
def check_password(
password: str,
encoded: str,
setter: Optional[Callable] = ...,
preferred: str = ...
) -> bool: ...
def get_hasher(algorithm: str = ...) -> BasePasswordHasher: ...
def get_hashers(
) -> Union[List[UnsaltedMD5PasswordHasher], List[MD5PasswordHasher], List[BasePasswordHasher], List[PBKDF2PasswordHasher]]: ...
def get_hashers_by_algorithm() -> Dict[str, BasePasswordHasher]: ...
def identify_hasher(encoded: str) -> BasePasswordHasher: ...
def is_password_usable(encoded: Optional[str]) -> bool: ...
def make_password(password: Optional[str], salt: Optional[str] = ..., hasher: str = ...) -> str: ...
def mask_hash(hash: str, show: int = ..., char: str = ...) -> str: ...
def reset_hashers(**kwargs) -> None: ...
class BasePasswordHasher:
def harden_runtime(self, password: str, encoded: str) -> None: ...
def must_update(self, encoded: str) -> bool: ...
def safe_summary(self, encoded: str): ...
def salt(self) -> str: ...
class MD5PasswordHasher:
def encode(self, password: str, salt: str) -> str: ...
def safe_summary(self, encoded: str) -> OrderedDict: ...
def verify(self, password: str, encoded: str) -> bool: ...
class PBKDF2PasswordHasher:
def encode(self, password: str, salt: str, iterations: Optional[int] = ...) -> str: ...
def must_update(self, encoded: str) -> bool: ...
def verify(self, password: str, encoded: str) -> bool: ...
class SHA1PasswordHasher:
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
class UnsaltedMD5PasswordHasher:
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
class UnsaltedSHA1PasswordHasher:
def encode(self, password: str, salt: str) -> str: ...
def salt(self) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...