We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc92e70 commit 66fdb2cCopy full SHA for 66fdb2c
Doc/src/public_key/ecc.rst
@@ -23,7 +23,7 @@ resistant to brute force attacks::
23
24
>>> pwd = b'secret'
25
>>> with open("myprivatekey.pem", "wt") as f:
26
- >>> data = mykey.export_key(format='PEM'
+ >>> data = mykey.export_key(format='PEM',
27
passphrase=pwd,
28
protection='PBKDF2WithHMAC-SHA512AndAES256-CBC',
29
prot_params={'iteration_count':131072})
@@ -38,8 +38,8 @@ and reimport it later::
38
39
You can also export the public key, which is not sensitive::
40
41
- >>> with open("mypublickey.pem", "wbt") as f:
42
- >>> data = mykey.public_key().export_key()
+ >>> with open("mypublickey.pem", "wt") as f:
+ >>> data = mykey.public_key().export_key(format='PEM')
43
44
.. _ECC table:
45
.. csv-table::
0 commit comments