From: Apprentice Harper Date: Mon, 23 Nov 2020 13:31:10 +0000 (+0000) Subject: Merge pull request #1362 from ivan-m/pycrypto_rsa_long X-Git-Url: http://git.xmof.duckdns.org/?a=commitdiff_plain;h=87881659c413908564a8d2a062eb401fe73c6277;p=DeDRM.git 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) --- 87881659c413908564a8d2a062eb401fe73c6277 diff --cc DeDRM_plugin/ineptepub.py index 8d88733,4817ca9..f4665b2 --- a/DeDRM_plugin/ineptepub.py +++ b/DeDRM_plugin/ineptepub.py @@@ -311,10 -310,10 +311,10 @@@ def _load_crypto_pycrypto() total = 0 for byte in bytes: total = (total << 8) + byte - return total + return long(total) def decrypt(self, data): - return self._rsa.decrypt(data) + return _PKCS1_v1_5.new(self._rsa).decrypt(data, 172) return (AES, RSA)