1 # Stubs for hashlib (Python 2)
\r
3 from typing import Tuple, Union
\r
5 _DataType = Union[str, unicode, bytearray, buffer, memoryview]
\r
7 class _hash(object): # This is not actually in the module namespace.
\r
8 name = ... # type: str
\r
12 def __init__(self, arg: _DataType = ...) -> None: ...
\r
13 def update(self, arg: _DataType) -> None: ...
\r
14 def digest(self) -> str: ...
\r
15 def hexdigest(self) -> str: ...
\r
16 def copy(self) -> _hash: ...
\r
18 def new(name: str, data: str = ...) -> _hash: ...
\r
20 def md5(s: _DataType = ...) -> _hash: ...
\r
21 def sha1(s: _DataType = ...) -> _hash: ...
\r
22 def sha224(s: _DataType = ...) -> _hash: ...
\r
23 def sha256(s: _DataType = ...) -> _hash: ...
\r
24 def sha384(s: _DataType = ...) -> _hash: ...
\r
25 def sha512(s: _DataType = ...) -> _hash: ...
\r
27 algorithms = ... # type: Tuple[str, ...]
\r
28 algorithms_guaranteed = ... # type: Tuple[str, ...]
\r
29 algorithms_available = ... # type: Tuple[str, ...]
\r
31 def pbkdf2_hmac(name: str, password: str, salt: str, rounds: int, dklen: int = ...) -> str: ...
\r