Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Invalid key size (104) for RC4. #269

Open
sentry-io bot opened this issue Oct 4, 2023 · 0 comments
Open

ValueError: Invalid key size (104) for RC4. #269

sentry-io bot opened this issue Oct 4, 2023 · 0 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Oct 4, 2023

Related to the pdf.metadata line from #249

ValueError: Invalid key size (104) for RC4
...
File "prepline_general/api/general.py", line 607, in response_generator
    response = pipeline_api(
  File "prepline_general/api/general.py", line 281, in pipeline_api
    pdf.metadata
  File "pypdf/_reader.py", line 388, in metadata
    obj = self.trailer[TK.INFO]
  File "pypdf/generic/_data_structures.py", line 320, in __getitem__
    return dict.__getitem__(self, key).get_object()
  File "pypdf/generic/_base.py", line 312, in get_object
    obj = self.pdf.get_object(self)
  File "pypdf/_reader.py", line 1410, in get_object
    retval = self._encryption.decrypt_object(
  File "pypdf/_encryption.py", line 845, in decrypt_object
    cf = self._make_crypt_filter(idnum, generation)
  File "pypdf/_encryption.py", line 917, in _make_crypt_filter
    stm_crypt = self._get_crypt(self.StmF, rc4_key, aes128_key, aes256_key)
  File "pypdf/_encryption.py", line 934, in _get_crypt
    return CryptRC4(rc4_key)
  File "pypdf/_crypt_providers/_cryptography.py", line 43, in __init__
    self.cipher = Cipher(ARC4(key), mode=None)
  File "cryptography/hazmat/primitives/ciphers/algorithms.py", line 143, in __init__
    self.key = _verify_key_size(self, key)
  File "cryptography/hazmat/primitives/ciphers/algorithms.py", line 20, in _verify_key_size
    raise ValueError(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants