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 util/decode_priv_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
===================================================================

Generates RSA keys and decodes them using python-rsa
for use with a CircuitPython secrets file.
for use with a CircuitPython settings.toml file.

This script is designed to run on a computer,
NOT a CircuitPython device.
Expand Down Expand Up @@ -36,5 +36,5 @@
print("No file named rsa_private.pem found in directory.")
pk = rsa.PrivateKey.load_pkcs1(private_key)

print("Copy and paste this into your secrets.py file:\n")
print('"private_key": ' + str(pk)[10:] + ",")
print("Copy and paste this into your settings.toml file:\n")
print(f'private_key="{str(pk)[10:]}"')