Skip to content

Commit 7949b7b

Browse files
committed
Fix typing errors
1 parent 5fc32b5 commit 7949b7b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Crypto/Protocol/HPKE.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(self,
9494
aead_id: AEAD,
9595
mode: MODE):
9696

97-
self.enc: bytes = enc
97+
self.enc: bytes = b'' if enc is None else enc
9898
"""The encapsulated session key."""
9999

100100
self._verify_psk_inputs(mode, psk_pair)

lib/Crypto/SelfTest/Protocol/test_HPKE.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class HPKE_TestVectors(unittest.TestCase):
335335
def setUp(self):
336336
self.vectors = []
337337
try:
338-
import pycryptodome_test_vectors
338+
import pycryptodome_test_vectors # type: ignore
339339
init_dir = os.path.dirname(pycryptodome_test_vectors.__file__)
340340
full_file_name = os.path.join(init_dir, "Protocol", "HPKE-test-vectors.json")
341341
with open(full_file_name, "r") as f:

0 commit comments

Comments
 (0)