Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/src/public_key/ecc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resistant to brute force attacks::

>>> pwd = b'secret'
>>> with open("myprivatekey.pem", "wt") as f:
>>> data = mykey.export_key(format='PEM'
>>> data = mykey.export_key(format='PEM',
passphrase=pwd,
protection='PBKDF2WithHMAC-SHA512AndAES256-CBC',
prot_params={'iteration_count':131072})
Expand All @@ -38,8 +38,8 @@ and reimport it later::

You can also export the public key, which is not sensitive::

>>> with open("mypublickey.pem", "wbt") as f:
>>> data = mykey.public_key().export_key()
>>> with open("mypublickey.pem", "wt") as f:
>>> data = mykey.public_key().export_key(format='PEM')

.. _ECC table:
.. csv-table::
Expand Down
Loading