码迷,mamicode.com
首页 > 编程语言 > 详细

Java中不同类型的密钥库 -- JKS

时间:2020-10-18 17:01:23      阅读:9      评论:0      收藏:0      [点我收藏+]

标签:tar   use   rac   The   design   com   不同   not   tor   

原文:https://www.pixelstech.net/article/1409966488-Different-types-of-keystore-in-Java----JKS

机器翻译

Different types of keystore in Java -- JKS

Java中不同类型的密钥库 -- JKS

JKS is Java Keystore, a proprietary keystore type designed for Java. It can be used to store private keys and certificates used for SSL communication, it cannot store secret keys however. The keytool shipped with JDKs cannot extract private keys stored on JKS. This type of keystore usually has an extension of jks.

JKS是Java密钥库,一种专为Java设计的密钥库类型。它可以用来存储用于SSL通信的私钥和证书,但是它不能存储密钥。JDKs附带的keytool无法提取JKS上存储的私钥。这种类型的密钥库通常有jks的扩展。

Next we will show how to operate the JKS keystore with pure Java code.

接下来,我们将展示如何使用纯Java代码操作JKS密钥库。

Create JKS keystore

创建JKS密钥库

The simplest method to create a JKS keystore to create an empty keystore. We can first get an instance of KeyStore and then load a null keystore. After loading the null keystore, we just need to call KeyStore.store() with the keystore name and password of the keystore.
Below is a simple demo:

创建JKS密钥库的最简单方法是创建空密钥库。我们可以首先获得KeyStore的一个实例,然后加载一个空KeyStore。加载空密钥库后,我们只需要调用KeyStore.store()方法并传递密钥库名称和密钥库的密码。

下面是一个简单的演示:

 

Java中不同类型的密钥库 -- JKS

标签:tar   use   rac   The   design   com   不同   not   tor   

原文地址:https://www.cnblogs.com/yangchongxing/p/13834467.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!