| 限定符和类型 | 字段和说明 |
|---|---|
static String |
TYPE_JCEKS
jceks
|
static String |
TYPE_JKS
Java密钥库(Java Key Store,JKS)KEY_STORE
|
static String |
TYPE_PKCS12
PKCS12是公钥加密标准,它规定了可包含所有私钥、公钥和证书。
|
| 构造器和说明 |
|---|
KeyStoreUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static KeyStore |
getKeyStore(String type)
获取
KeyStore对象 |
static KeyStore |
readJKSKeyStore(File keyFile,
char[] password)
|
static KeyStore |
readJKSKeyStore(InputStream in,
char[] password)
|
static KeyStore |
readKeyStore(String type,
File keyFile,
char[] password)
|
static KeyStore |
readKeyStore(String type,
InputStream in,
char[] password)
|
static KeyStore |
readPKCS12KeyStore(File keyFile,
char[] password)
读取PKCS12 KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
static KeyStore |
readPKCS12KeyStore(InputStream in,
char[] password)
读取PKCS12 KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
public static KeyStore readJKSKeyStore(File keyFile, char[] password)
keyFile - 证书文件password - 密码KeyStorepublic static KeyStore readJKSKeyStore(InputStream in, char[] password)
in - InputStream 如果想从文件读取.keystore文件,使用 FileUtil.getInputStream(File) 读取password - 密码KeyStorepublic static KeyStore readPKCS12KeyStore(File keyFile, char[] password)
keyFile - 证书文件password - 密码KeyStorepublic static KeyStore readPKCS12KeyStore(InputStream in, char[] password)
in - InputStream 如果想从文件读取.keystore文件,使用 FileUtil.getInputStream(java.io.File) 读取password - 密码KeyStorepublic static KeyStore readKeyStore(String type, File keyFile, char[] password)
type - 类型keyFile - 证书文件password - 密码,null表示无密码KeyStorepublic static KeyStore readKeyStore(String type, InputStream in, char[] password)
type - 类型in - InputStream 如果想从文件读取.keystore文件,使用 FileUtil.getInputStream(File) 读取password - 密码,null表示无密码KeyStoreCopyright © 2023. All rights reserved.