mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-01-01 14:27:39 +06:00
Merge pull request #1362 from ivan-m/pycrypto_rsa_long
PyCrypto requires RSA values to be long not int (which is possible for small numbers)
This commit is contained in:
commit
87881659c4
@ -311,7 +311,7 @@ def _load_crypto_pycrypto():
|
|||||||
total = 0
|
total = 0
|
||||||
for byte in bytes:
|
for byte in bytes:
|
||||||
total = (total << 8) + byte
|
total = (total << 8) + byte
|
||||||
return total
|
return long(total)
|
||||||
|
|
||||||
def decrypt(self, data):
|
def decrypt(self, data):
|
||||||
return _PKCS1_v1_5.new(self._rsa).decrypt(data, 172)
|
return _PKCS1_v1_5.new(self._rsa).decrypt(data, 172)
|
||||||
|
Loading…
Reference in New Issue
Block a user