mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 04:34:29 +08:00
18 lines
482 B
Python
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: ... |