Skip to content

Commit

Permalink
Add pyi
Browse files Browse the repository at this point in the history
  • Loading branch information
TimeEngineer committed Nov 28, 2022
1 parent 96783b4 commit 9c5be21
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
8 changes: 8 additions & 0 deletions parsec/_parsec.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ from parsec._parsec_pyi.crypto import (
VerifyKey,
PrivateKey,
PublicKey,
SequesterPrivateKeyDer,
SequesterPublicKeyDer,
SequesterSigningKeyDer,
SequesterVerifyKeyDer,
generate_nonce,
)

Expand Down Expand Up @@ -526,6 +530,10 @@ __all__ = [
"VerifyKey",
"PrivateKey",
"PublicKey",
"SequesterPrivateKeyDer",
"SequesterPublicKeyDer",
"SequesterSigningKeyDer",
"SequesterVerifyKeyDer",
"generate_nonce",
# Enumerate
"ClientType",
Expand Down
37 changes: 37 additions & 0 deletions parsec/_parsec_pyi/crypto.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,41 @@ class PublicKey:
def encrypt_for_self(self, data: bytes) -> bytes: ...
def encode(self) -> bytes: ...

class SequesterPrivateKeyDer:
def __init__(self, data: bytes) -> None: ...
def dump(self) -> bytes: ...
def dump_pem(self) -> str: ...
@classmethod
def load_pem(cls, s: str) -> SequesterPrivateKeyDer: ...
def decrypt(self, data: bytes) -> bytes: ...
@property
def public_key(self) -> SequesterPublicKeyDer: ...
@property
def signing_key(self) -> SequesterSigningKeyDer: ...

class SequesterPublicKeyDer:
def __init__(self, data: bytes) -> None: ...
def dump(self) -> bytes: ...
def dump_pem(self) -> str: ...
@classmethod
def load_pem(cls, s: str) -> SequesterPublicKeyDer: ...
def encrypt(self, data: bytes) -> bytes: ...
@property
def verify_key(self) -> SequesterVerifyKeyDer: ...

class SequesterSigningKeyDer:
def dump(self) -> bytes: ...
def dump_pem(self) -> str: ...
@classmethod
def load_pem(cls, s: str) -> SequesterSigningKeyDer: ...
def sign(self, data: bytes) -> bytes: ...

class SequesterVerifyKeyDer:
def __init__(self, data: bytes) -> None: ...
def dump(self) -> bytes: ...
def dump_pem(self) -> str: ...
@classmethod
def load_pem(cls, s: str) -> SequesterVerifyKeyDer: ...
def verify(self, data: bytes) -> bytes: ...

def generate_nonce() -> bytes: ...

0 comments on commit 9c5be21

Please sign in to comment.