Last active
August 4, 2022 09:17
-
-
Save NMillard/419d855c757694dd450cb878b6f5b731 to your computer and use it in GitHub Desktop.
Create RSA key paris
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
| class Program { | |
| static void Main(string[] args) { | |
| using RSA rsa = RSA.Create(); | |
| Console.WriteLine($"-----Private key-----{Environment.NewLine}{Convert.ToBase64String(rsa.ExportRSAPrivateKey())}{Environment.NewLine}"); | |
| Console.WriteLine($"-----Public key-----{Environment.NewLine}{Convert.ToBase64String(rsa.ExportRSAPublicKey())}"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment