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

When the username/password concat is too long, encryptPassword fails #151

Open
Hainish opened this issue Sep 15, 2021 · 0 comments
Open

Comments

@Hainish
Copy link

Hainish commented Sep 15, 2021

When the combined username/password combo is longer than 84 characters, an error is encountered when calling login:

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    api.login(email=mail, password=passwd)
  File "/home/user/workspace/googleplay-api/gpapi/googleplay.py", line 214, in login
    encryptedPass = self.encryptPassword(email, password).decode('utf-8')
  File "/home/user/workspace/googleplay-api/gpapi/googleplay.py", line 124, in encryptPassword
    label=None
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/rsa.py", line 448, in encrypt
    return _enc_dec_rsa(self._backend, self, plaintext, padding)
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/rsa.py", line 68, in _enc_dec_rsa
    return _enc_dec_rsa_pkey_ctx(backend, key, data, padding_enum, padding)
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/rsa.py", line 122, in _enc_dec_rsa_pkey_ctx
    _handle_rsa_enc_dec_error(backend, key)
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/rsa.py", line 136, in _handle_rsa_enc_dec_error
    "Data too long for key size. Encrypt less data or use a "
ValueError: Data too long for key size. Encrypt less data or use a larger key size.
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

1 participant