doc error in example of exporting RSA key
Bug #1191411 reported by
Tomas Vondra
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
The current documentation contains this example of exporting RSA key
>>> from Crypto.PublicKey import RSA
>>>
>>> key = RSA.generate(2048)
>>> f = open('mykey.
>>> f.write(
>>> f.close()
...
>>> f = open('mykey.
>>> key = RSA.importKey(
which is incorrect and the example fails. It should use "key.exportKey" and not "RSA.exportKey".
To post a comment you must log in.
Thanks for reporting! This will be fixed in the next release.
Pull request: https:/ /github. com/dlitz/ pycrypto/ pull/43
Fix committed: https:/ /github. com/dlitz/ pycrypto/ commit/ f9a0fc77e1c8847 c1a17503e5a1b86 a409b8cb2d