summaryrefslogtreecommitdiff
path: root/src/OpenSSL/rand.py
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-05-20 14:44:59 +0200
committerGitHub <noreply@github.com>2022-05-20 14:44:59 +0200
commitdd98e31ad6f9e33f351d47246d6d09c804ba8c29 (patch)
treeb356ff30f5d8d45ef0023f6985059575522364ca /src/OpenSSL/rand.py
parent45ebb73416a67cb87b7ca0bfcfe7902b4f38250a (diff)
downloadpyopenssl-dd98e31ad6f9e33f351d47246d6d09c804ba8c29.tar.gz
Add inline type annotations (#1089)
* crypto: Add type annotations * Don’t redefine var mypy complains about the redefinition * _util: Add type annotations * rand: Add type annotations * Prepare package & CI for running mypy * fix toxenv name Co-authored-by: Maximilian Hils <github@maximilianhils.com>
Diffstat (limited to 'src/OpenSSL/rand.py')
-rw-r--r--src/OpenSSL/rand.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/OpenSSL/rand.py b/src/OpenSSL/rand.py
index d2c1767..a4aa721 100644
--- a/src/OpenSSL/rand.py
+++ b/src/OpenSSL/rand.py
@@ -5,7 +5,7 @@ PRNG management routines, thin wrappers.
from OpenSSL._util import lib as _lib
-def add(buffer, entropy):
+def add(buffer: bytes, entropy: int) -> None:
"""
Mix bytes from *string* into the PRNG state.
@@ -31,7 +31,7 @@ def add(buffer, entropy):
_lib.RAND_add(buffer, len(buffer), entropy)
-def status():
+def status() -> int:
"""
Check whether the PRNG has been seeded with enough data.