Skip to content

Commit 66093ae

Browse files
committed
[pdf2] Add bytearray to a few argument types
1 parent fd33f04 commit 66093ae

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

stubs/fpdf2/fpdf/encryption.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ class StandardSecurityHandler:
8787
@overload
8888
def encrypt(self, text: str, obj_id: int) -> str: ...
8989
def encrypt_string(self, string: str, obj_id: int) -> str: ...
90-
def encrypt_stream(self, stream: bytes, obj_id: int) -> bytes: ...
90+
def encrypt_stream(self, stream: bytes | bytearray, obj_id: int) -> bytes: ...
9191
def is_aes_algorithm(self) -> bool: ...
92-
def encrypt_bytes(self, data: bytes, obj_id: int) -> list[int]: ...
93-
def encrypt_AES_cryptography(self, key: bytes, data: bytes) -> bytes: ...
92+
def encrypt_bytes(self, data: bytes | bytearray, obj_id: int) -> list[int]: ...
93+
def encrypt_AES_cryptography(self, key: bytes, data: bytes | bytearray) -> bytes: ...
9494
@classmethod
9595
def get_random_bytes(cls, size: int) -> bytes: ...
9696
@classmethod
@@ -99,7 +99,7 @@ class StandardSecurityHandler:
9999
def generate_owner_password(self) -> str: ...
100100
def generate_user_password(self) -> str: ...
101101
@classmethod
102-
def compute_hash(cls, input_password: bytes, salt: bytes, user_key: bytes = ...) -> bytes: ...
102+
def compute_hash(cls, input_password: bytes | bytearray, salt: bytes, user_key: bytes | bytearray = ...) -> bytes: ...
103103
def generate_user_password_rev6(self) -> None: ...
104104
def generate_owner_password_rev6(self) -> None: ...
105105
def generate_perms_rev6(self) -> None: ...

0 commit comments

Comments
 (0)