Created
August 2, 2019 10:42
-
-
Save Ddedalus/60ac9c04839f1b04aa460cc90c31fc73 to your computer and use it in GitHub Desktop.
Generate private key in Python over arbitrary alphabet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import secrets | |
| import string | |
| alphabet = string.ascii_letters + string.digits | |
| key = ''.join(secrets.choice(alphabet) for i in range(40)) | |
| print(key) | |
| # source: https://www.geeksforgeeks.org/secrets-python-module-generate-secure-random-numbers/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment