From 1dac2263372df2b85db5d029a45721fa158a5c9d Mon Sep 17 00:00:00 2001 From: xiubuzhe Date: Sun, 8 Oct 2023 20:59:00 +0800 Subject: first add files --- lib/Crypto/Random/__init__.pyi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/Crypto/Random/__init__.pyi (limited to 'lib/Crypto/Random/__init__.pyi') diff --git a/lib/Crypto/Random/__init__.pyi b/lib/Crypto/Random/__init__.pyi new file mode 100644 index 0000000..ddc5b9b --- /dev/null +++ b/lib/Crypto/Random/__init__.pyi @@ -0,0 +1,19 @@ +from typing import Any + +__all__ = ['new', 'get_random_bytes'] + +from os import urandom + +class _UrandomRNG(object): + + def read(self, n: int) -> bytes:... + def flush(self) -> None: ... + def reinit(self) -> None: ... + def close(self) -> None: ... + +def new(*args: Any, **kwargs: Any) -> _UrandomRNG: ... + +def atfork() -> None: ... + +get_random_bytes = urandom + -- cgit v1.2.3