Skip to content

Commit

Permalink
STY: Changes to if and elif use
Browse files Browse the repository at this point in the history
Slight increase of readability.
  • Loading branch information
j-t-1 authored Nov 27, 2024
1 parent 48ad397 commit 3254996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pypdf/_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,12 +944,12 @@ def _get_crypt(
) -> CryptBase:
if method == "/AESV2":
return CryptAES(aes128_key)
elif method == "/AESV3":
if method == "/AESV3":
return CryptAES(aes256_key)
elif method == "/Identity":
if method == "/Identity":
return CryptIdentity()
else:
return CryptRC4(rc4_key)

return CryptRC4(rc4_key)

@staticmethod
def _encode_password(password: Union[bytes, str]) -> bytes:
Expand Down

0 comments on commit 3254996

Please sign in to comment.