File: hashlib.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (27 lines) | stat: -rw-r--r-- 842 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Stubs for hashlib (Python 2)

from typing import Tuple

class _hash(object):
    # This is not actually in the module namespace.
    digest_size = 0
    block_size = 0
    def update(self, arg: str) -> None: ...
    def digest(self) -> str: ...
    def hexdigest(self) -> str: ...
    def copy(self) -> _hash: ...

def new(name: str, data: str = ...) -> _hash: ...

def md5(s: str = ...) -> _hash: ...
def sha1(s: str = ...) -> _hash: ...
def sha224(s: str = ...) -> _hash: ...
def sha256(s: str = ...) -> _hash: ...
def sha384(s: str = ...) -> _hash: ...
def sha512(s: str = ...) -> _hash: ...

algorithms = ...  # type: Tuple[str, ...]
algorithms_guaranteed = ...  # type: Tuple[str, ...]
algorithms_available = ...  # type: Tuple[str, ...]

def pbkdf2_hmac(name: str, password: str, salt: str, rounds: int, dklen: int = ...) -> str: ...