@@ -21,12 +21,20 @@ class _Hash(object):
21
21
def hexdigest (self ) -> str : ...
22
22
def update (self , arg : _DataType ) -> None : ...
23
23
24
- def md5 (arg : _DataType = ...) -> _Hash : ...
25
- def sha1 (arg : _DataType = ...) -> _Hash : ...
26
- def sha224 (arg : _DataType = ...) -> _Hash : ...
27
- def sha256 (arg : _DataType = ...) -> _Hash : ...
28
- def sha384 (arg : _DataType = ...) -> _Hash : ...
29
- def sha512 (arg : _DataType = ...) -> _Hash : ...
24
+ if sys .version_info >= (3 , 8 ):
25
+ def md5 (string : _DataType = ...) -> _Hash : ...
26
+ def sha1 (string : _DataType = ...) -> _Hash : ...
27
+ def sha224 (string : _DataType = ...) -> _Hash : ...
28
+ def sha256 (string : _DataType = ...) -> _Hash : ...
29
+ def sha384 (string : _DataType = ...) -> _Hash : ...
30
+ def sha512 (string : _DataType = ...) -> _Hash : ...
31
+ else :
32
+ def md5 (__string : _DataType = ...) -> _Hash : ...
33
+ def sha1 (__string : _DataType = ...) -> _Hash : ...
34
+ def sha224 (__string : _DataType = ...) -> _Hash : ...
35
+ def sha256 (__string : _DataType = ...) -> _Hash : ...
36
+ def sha384 (__string : _DataType = ...) -> _Hash : ...
37
+ def sha512 (__string : _DataType = ...) -> _Hash : ...
30
38
31
39
def new (name : str , data : _DataType = ...) -> _Hash : ...
32
40
@@ -55,7 +63,7 @@ if sys.version_info >= (3, 6):
55
63
shake_128 = _VarLenHash
56
64
shake_256 = _VarLenHash
57
65
58
- def scrypt (password : _DataType , * , salt : _DataType , n : int , r : int , p : int , maxmem : int = ..., dklen : int = ...) -> bytes : ...
66
+ def scrypt (password : _DataType , * , salt : Optional [ _DataType ] = ... , n : Optional [ int ] = ... , r : Optional [ int ] = ... , p : Optional [ int ] = ... , maxmem : int = ..., dklen : int = ...) -> bytes : ...
59
67
60
68
class _BlakeHash (_Hash ):
61
69
MAX_DIGEST_SIZE : int
0 commit comments