diff options
author | NoDRM <[email protected]> | 2022-07-16 09:48:27 +0200 |
---|---|---|
committer | NoDRM <[email protected]> | 2022-07-16 09:54:00 +0200 |
commit | c15135b12ff2a0944f456314fa801d5881c2b161 (patch) | |
tree | 6f87c810676fd30e72798198b4fa93d7e123c959 /DeDRM_plugin | |
parent | 077e8f5c2a6381f4c3803ea4f0b87b1ca85f6fb4 (diff) |
Fix RSA.import_key (fixes #101)
Apparently "import_key" only exists in newer versions (as an alias to
"importKey"). "importKey" works in all versions ...
Diffstat (limited to 'DeDRM_plugin')
-rw-r--r-- | DeDRM_plugin/ineptepub.py | 2 | ||||
-rwxr-xr-x | DeDRM_plugin/ineptpdf.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/DeDRM_plugin/ineptepub.py b/DeDRM_plugin/ineptepub.py index b9ec149..6b4b676 100644 --- a/DeDRM_plugin/ineptepub.py +++ b/DeDRM_plugin/ineptepub.py @@ -302,7 +302,7 @@ def decryptBook(userkey, inpath, outpath): if len(bookkey) != 64: # Normal or "hardened" Adobe ADEPT - rsakey = RSA.import_key(userkey) # parses the ASN1 structure + rsakey = RSA.importKey(userkey) # parses the ASN1 structure bookkey = base64.b64decode(bookkey) if int(keytype, 10) > 2: bookkey = removeHardening(rights, keytype, bookkey) diff --git a/DeDRM_plugin/ineptpdf.py b/DeDRM_plugin/ineptpdf.py index 24fc150..7a14750 100755 --- a/DeDRM_plugin/ineptpdf.py +++ b/DeDRM_plugin/ineptpdf.py @@ -1669,7 +1669,7 @@ class PDFDocument(object): def initialize_ebx_inept(self, password, docid, param): self.is_printable = self.is_modifiable = self.is_extractable = True - rsakey = RSA.import_key(password) # parses the ASN1 structure + rsakey = RSA.importKey(password) # parses the ASN1 structure length = int_value(param.get('Length', 0)) // 8 rights = codecs.decode(param.get('ADEPT_LICENSE'), 'base64') rights = zlib.decompress(rights, -15) |