| 1 |
from typing import Dict, Tuple, Callable, Union, Optional |
| 2 |
|
| 3 |
__all__ = ['generate', 'construct', 'DsaKey', 'import_key' ] |
| 4 |
|
| 5 |
RNG = Callable[[int], bytes] |
| 6 |
|
| 7 |
class DsaKey(object): |
| 8 |
def __init__(self, key_dict: Dict[str, int]) -> None: ... |
| 9 |
def has_private(self) -> bool: ... |
| 10 |
def can_encrypt(self) -> bool: ... |
| 11 |
def can_sign(self) -> bool: ... |
| 12 |
def public_key(self) -> DsaKey: ... |
| 13 |
def __eq__(self, other: object) -> bool: ... |
| 14 |
def __ne__(self, other: object) -> bool: ... |
| 15 |
def __getstate__(self) -> None: ... |
| 16 |
def domain(self) -> Tuple[int, int, int]: ... |
| 17 |
def __repr__(self) -> str: ... |
| 18 |
def __getattr__(self, item: str) -> int: ... |
| 19 |
def export_key(self, format: Optional[str]="PEM", pkcs8: Optional[bool]=None, passphrase: Optional[str]=None, |
| 20 |
protection: Optional[str]=None, randfunc: Optional[RNG]=None) -> bytes: ... |
| 21 |
|
| 22 |
exportKey = export_key |
| 23 |
publickey = public_key |
| 24 |
|
| 25 |
def generate(bits: int, randfunc: Optional[RNG]=None, domain: Optional[Tuple[int, int, int]]=None) -> DsaKey: ... |
| 26 |
def construct(tup: Union[Tuple[int, int, int, int], Tuple[int, int, int, int, int]], consistency_check: Optional[bool]=True) -> DsaKey: ... |
| 27 |
def import_key(extern_key: Union[str, bytes], passphrase: Optional[str]=None) -> DsaKey: ... |
| 28 |
|
| 29 |
importKey = import_key |
| 30 |
|
| 31 |
oid: str |