Skip to content

Commit

Permalink
Make examples correct
Browse files Browse the repository at this point in the history
Missing a comma in one call, format is required in another
  • Loading branch information
paulehoffman authored Dec 13, 2024
1 parent dc92e70 commit d103cc3
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit d103cc3

Please sign in to comment.