Created
July 4, 2020 23:25
-
-
Save thanakijwanavit/80350c42d086bb0f1ddb7c47dbf694b8 to your computer and use it in GitHub Desktop.
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
| def generate_RSA(bits=2048): | |
| new_key = RSA.generate(bits, e=65537) | |
| public_key = new_key.publickey().exportKey("PEM").decode() | |
| private_key = new_key.exportKey("PEM").decode() | |
| return private_key, public_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment