Skip to content

Commit 66fdb2c

Browse files
paulehoffmanLegrandin
authored andcommitted
Make examples correct
Missing a comma in one call, format is required in another
1 parent dc92e70 commit 66fdb2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/src/public_key/ecc.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resistant to brute force attacks::
2323

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

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

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

4444
.. _ECC table:
4545
.. csv-table::

0 commit comments

Comments
 (0)