Files
django-stubs/django/utils/crypto.pyi
2018-07-29 18:27:46 +03:00

18 lines
482 B
Python

from hmac import HMAC
from typing import (
Callable,
Optional,
Union,
)
def constant_time_compare(val1: Union[str, bytes], val2: Union[str, bytes]) -> bool: ...
def get_random_string(length: int = ..., allowed_chars: str = ...) -> str: ...
def pbkdf2(password: str, salt: str, iterations: int, dklen: int = ..., digest: Callable = ...) -> bytes: ...
def salted_hmac(key_salt: str, value: Union[str, bytes], secret: Optional[Union[str, bytes]] = ...) -> HMAC: ...