Files
typeshed/stdlib/3/hashlib.pyi
2015-11-09 13:55:02 -08:00

26 lines
669 B
Python

# Stubs for hashlib
# NOTE: These are incomplete!
from abc import abstractmethod, ABCMeta
import typing
class Hash(metaclass=ABCMeta):
@abstractmethod
def update(self, arg: bytes) -> None: ...
@abstractmethod
def digest(self) -> bytes: ...
@abstractmethod
def hexdigest(self) -> str: ...
@abstractmethod
def copy(self) -> 'Hash': ...
def md5(arg: bytes = ...) -> Hash: ...
def sha1(arg: bytes = ...) -> Hash: ...
def sha224(arg: bytes = ...) -> Hash: ...
def sha256(arg: bytes = ...) -> Hash: ...
def sha384(arg: bytes = ...) -> Hash: ...
def sha512(arg: bytes = ...) -> Hash: ...
def new(name: str, data: bytes = ...) -> Hash: ...