Java encryption Technology (eight)

Source: Internet
Author: User

The main content of this article is the implementation of the Java certificate System.

Please read this content in the first reading of Java encryption Technology (IV), in advance understand the RSA encryption algorithm.

Before building the Java code implementation, we need to complete the production of the certificate.

1. Generate Keystroe Files

At the command line, execute the following command:

Shell Code

Keytool-genkey-alias Www.zlex.org-keyalg Rsa-keystore D:\zlex.keystore

which

-genkey indicates that the key is generated

-alias Specify alias, this is www.zlex.org

-KEYALG Specifies the algorithm, this is RSA

-keystore Specify storage location, this is D:\zlex.keystore

The password I use here is 123456.

Console output:

Console code

输入keystore密码:
再次输入新密码:
您的名字与姓氏是什么?
  [Unknown]: www.zlex.org
您的组织单位名称是什么?
  [Unknown]: zlex
您的组织名称是什么?
  [Unknown]: zlex
您所在的城市或区域名称是什么?
  [Unknown]: BJ
您所在的州或省份名称是什么?
  [Unknown]: BJ
该单位的两字母国家代码是什么
  [Unknown]: CN
CN=www.zlex.org, OU=zlex, O=zlex, L=BJ, ST=BJ, C=CN 正确吗?
  [否]: Y
输入<tomcat>的主密码
     (如果和 keystore 密码相同,按回车):
再次输入新密码:

At this point, a Zlex.keystore file is generated under D disk.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.