Skip to content

Commit c4a5899

Browse files
Add a few missed type annotations in random.py.
1 parent 7d42a1d commit c4a5899

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfcrypt/random.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Random:
3333
A Cryptographically Secure Pseudo Random Number Generator - CSPRNG
3434
"""
3535

36-
def __init__(self, nonce=b"", device_id=_lib.INVALID_DEVID) -> None:
36+
def __init__(self, nonce: __builtins__.bytes = b"", device_id: int = _lib.INVALID_DEVID) -> None:
3737
self.native_object = _ffi.new("WC_RNG *")
3838

3939
ret = _lib.wc_InitRngNonce_ex(self.native_object, nonce, len(nonce), _ffi.NULL, device_id)
@@ -65,7 +65,7 @@ def byte(self) -> __builtins__.bytes:
6565

6666
return _ffi.buffer(result, 1)[:]
6767

68-
def bytes(self, length) -> __builtins__.bytes:
68+
def bytes(self, length: int) -> __builtins__.bytes:
6969
"""
7070
Generate and return a random sequence of length bytes.
7171
"""

0 commit comments

Comments
 (0)