Use cmd to create a key (signature file) process

Personal records for future reference

1. Enter cmd.

2. Use cmd to enter the bin directory of the jdk installation directory.

3. Use the command line to create the signature file.

4. Command:

keytool -genkey -alias keystore name-keyalg RSA -validity validity time-keystore keystore file name

  • alias: The meaning of alias, followed by the keystore name, for example: everness.
  • RSA: refers to an encryption method for keys.
  • validity: Valid time, followed by a time number, in "days", which can be customized. For example, 36500 (100 years).
  • kestore: file name, need to add the suffix of ".keystore". For example: everness.keystore.

5. Press Enter after the settings are completed.

6. Set the password for the keystore. You need to enter it twice. This password must be remembered, otherwise the key will be unusable .

7. Set other information, such as name, unit name, city name, etc. Since it is China, you can enter "CN" when setting the "Country/Region Code".

8. Confirm the content and enter "Y" if you agree.

9. Set the key password. A keystore can be set with multiple keys, but usually there is a one-to-one relationship, so just hitting Enter will make the key password and the keystore password the same.

10. After the creation is completed, the created signature file is in the bin directory of the jdk installation directory. You need to find a special place to store it. At the same time, it is best to store the key password in the same place for easy search and use.

Guess you like

Origin blog.csdn.net/EverNess010/article/details/100096553