-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source commit: python/typeshed@61ba4de
- Loading branch information
Showing
27 changed files
with
309 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import sys | ||
from _typeshed import ReadableBuffer | ||
from typing import ClassVar, final | ||
from typing_extensions import Self | ||
|
||
BLAKE2B_MAX_DIGEST_SIZE: int = 64 | ||
BLAKE2B_MAX_KEY_SIZE: int = 64 | ||
BLAKE2B_PERSON_SIZE: int = 16 | ||
BLAKE2B_SALT_SIZE: int = 16 | ||
BLAKE2S_MAX_DIGEST_SIZE: int = 32 | ||
BLAKE2S_MAX_KEY_SIZE: int = 32 | ||
BLAKE2S_PERSON_SIZE: int = 8 | ||
BLAKE2S_SALT_SIZE: int = 8 | ||
|
||
@final | ||
class blake2b: | ||
MAX_DIGEST_SIZE: ClassVar[int] = 64 | ||
MAX_KEY_SIZE: ClassVar[int] = 64 | ||
PERSON_SIZE: ClassVar[int] = 16 | ||
SALT_SIZE: ClassVar[int] = 16 | ||
block_size: int | ||
digest_size: int | ||
name: str | ||
if sys.version_info >= (3, 9): | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 64, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
usedforsecurity: bool = True, | ||
) -> None: ... | ||
else: | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 64, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
) -> None: ... | ||
|
||
def copy(self) -> Self: ... | ||
def digest(self) -> bytes: ... | ||
def hexdigest(self) -> str: ... | ||
def update(self, data: ReadableBuffer, /) -> None: ... | ||
|
||
@final | ||
class blake2s: | ||
MAX_DIGEST_SIZE: ClassVar[int] = 32 | ||
MAX_KEY_SIZE: ClassVar[int] = 32 | ||
PERSON_SIZE: ClassVar[int] = 8 | ||
SALT_SIZE: ClassVar[int] = 8 | ||
block_size: int | ||
digest_size: int | ||
name: str | ||
if sys.version_info >= (3, 9): | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 32, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
usedforsecurity: bool = True, | ||
) -> None: ... | ||
else: | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 32, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
) -> None: ... | ||
|
||
def copy(self) -> Self: ... | ||
def digest(self) -> bytes: ... | ||
def hexdigest(self) -> str: ... | ||
def update(self, data: ReadableBuffer, /) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from _typeshed import Incomplete | ||
from distutils.ccompiler import CCompiler | ||
from typing import ClassVar, Final | ||
|
||
PLAT_SPEC_TO_RUNTIME: Final[dict[str, str]] | ||
PLAT_TO_VCVARS: Final[dict[str, str]] | ||
|
||
class MSVCCompiler(CCompiler): | ||
compiler_type: ClassVar[str] | ||
executables: ClassVar[dict[Incomplete, Incomplete]] | ||
res_extension: ClassVar[str] | ||
initialized: bool | ||
def initialize(self, plat_name: str | None = None) -> None: ... |
Oops, something went wrong.