Add secrets.DEFAULT_ENTROPY (#15261)

This commit is contained in:
Victor Westerhuis
2026-01-11 23:32:42 +01:00
committed by GitHub
parent c96d8dd7f9
commit 111bbb5cd2
+3 -1
View File
@@ -1,12 +1,14 @@
from _typeshed import SupportsLenAndGetItem
from hmac import compare_digest as compare_digest
from random import SystemRandom as SystemRandom
from typing import TypeVar
from typing import Final, TypeVar
__all__ = ["choice", "randbelow", "randbits", "SystemRandom", "token_bytes", "token_hex", "token_urlsafe", "compare_digest"]
_T = TypeVar("_T")
DEFAULT_ENTROPY: Final[int]
def randbelow(exclusive_upper_bound: int) -> int: ...
def randbits(k: int) -> int: ...
def choice(seq: SupportsLenAndGetItem[_T]) -> _T: ...