feat(typing): Remove "libs" from pyright exclude and fix typing errors (#26423)

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Asuka Minato
2025-09-29 20:23:22 +09:00
committed by GitHub
parent f60aa36fa0
commit e5d4235f1b
4 changed files with 6 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ import gmpy2 # type: ignore
from Crypto import Random
from Crypto.Signature.pss import MGF1
from Crypto.Util.number import bytes_to_long, ceil_div, long_to_bytes
from Crypto.Util.py3compat import _copy_bytes, bord
from Crypto.Util.py3compat import bord
from Crypto.Util.strxor import strxor
@@ -72,7 +72,7 @@ class PKCS1OAepCipher:
else:
self._mgf = lambda x, y: MGF1(x, y, self._hashObj)
self._label = _copy_bytes(None, None, label)
self._label = bytes(label)
self._randfunc = randfunc
def can_encrypt(self):
@@ -120,7 +120,7 @@ class PKCS1OAepCipher:
# Step 2b
ps = b"\x00" * ps_len
# Step 2c
db = lHash + ps + b"\x01" + _copy_bytes(None, None, message)
db = lHash + ps + b"\x01" + bytes(message)
# Step 2d
ros = self._randfunc(hLen)
# Step 2e