-
-
Notifications
You must be signed in to change notification settings - Fork 51
Generating RSA Key Pair
NOTE: the public key is usually embedded into the application (e.g. it can be stored in a string constant) but the private key must be stored in a safe location. If private key is compromised, then we can no longer assume that the xml files are signed by a trusted party.
Click here to show/hide
Use the Patcher generate_rsa_key_pair
command:
- private: the filepath that the private RSA key will be generated at
- public: the filepath that the public RSA key will be generated at
Example: Patcher generate_rsa_key_pair -private="C:\Users\USERNAME\Desktop\private.key" -public="C:\Users\USERNAME\Desktop\public.key"
Click here to show/hide
Namespace: SimplePatchToolSecurity
static void SecurityUtils.CreateRSAKeyPair( out string publicKey, out string privateKey )
: creates public and private RSA keys and returns them as raw strings (i.e. it doesn't save the keys to text files)
Example code: SimplePatchToolConsoleApp.Program.GenerateRSAKeyPair
Click here to show/hide
Open Window-Simple Patch Tool window, click the Open Legacy Window button and switch to the SECURITY tab:
Then, simply click the Create RSA Key Pair button and select a folder in which the RSA key pair will be generated.