public class CryptoKeys extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CERT_TYPE_X509 |
static int |
DEFAULT_KEY_SIZE |
static String |
KEY_TYPE_JKS |
static String |
KEY_TYPE_PKCS12 |
static String |
SM2_DEFAULT_CURVE |
| 构造器和说明 |
|---|
CryptoKeys() |
| 限定符和类型 | 方法和说明 |
|---|---|
static SecretKey |
generateDESKey(Provider provider,
String algorithm,
byte[] key) |
static SecretKey |
generateDESKey(String algorithm,
byte[] key)
生成
SecretKey |
static SecretKey |
generateDESKey(String provider,
String algorithm,
byte[] key) |
static SecretKey |
generateKey(Provider provider,
String algorithm) |
static SecretKey |
generateKey(Provider provider,
String algorithm,
byte[] key) |
static SecretKey |
generateKey(Provider provider,
String algorithm,
int keySize) |
static SecretKey |
generateKey(Provider provider,
String algorithm,
int keySize,
SecureRandom random) |
static SecretKey |
generateKey(Provider provider,
String algorithm,
KeySpec keySpec) |
static SecretKey |
generateKey(String algorithm)
生成
SecretKey,仅用于对称加密和摘要算法密钥生成 |
static SecretKey |
generateKey(String algorithm,
byte[] key)
生成
SecretKey,仅用于对称加密和摘要算法密钥生成 |
static SecretKey |
generateKey(String algorithm,
int keySize)
生成
SecretKey,仅用于对称加密和摘要算法密钥生成当指定keySize<0时,AES默认长度为128,其它算法不指定。 |
static SecretKey |
generateKey(String algorithm,
int keySize,
SecureRandom random)
生成
SecretKey,仅用于对称加密和摘要算法密钥生成当指定keySize<0时,AES默认长度为128,其它算法不指定。 |
static SecretKey |
generateKey(String algorithm,
KeySpec keySpec)
生成
SecretKey,仅用于对称加密和摘要算法 |
static SecretKey |
generateKey(String provider,
String algorithm) |
static SecretKey |
generateKey(String provider,
String algorithm,
byte[] key) |
static SecretKey |
generateKey(String provider,
String algorithm,
int keySize) |
static SecretKey |
generateKey(String provider,
String algorithm,
int keySize,
SecureRandom random) |
static SecretKey |
generateKey(String provider,
String algorithm,
KeySpec keySpec) |
static SecretKey |
generateKeyBySeed(Provider provider,
String algorithm,
byte[] seed) |
static SecretKey |
generateKeyBySeed(String algorithm,
byte[] seed) |
static SecretKey |
generateKeyBySeed(String provider,
String algorithm,
byte[] seed) |
static KeyPair |
generateKeyPair(Provider provider,
String algorithm) |
static KeyPair |
generateKeyPair(Provider provider,
String algorithm,
AlgorithmParameterSpec params) |
static KeyPair |
generateKeyPair(Provider provider,
String algorithm,
byte[] seed,
AlgorithmParameterSpec param) |
static KeyPair |
generateKeyPair(Provider provider,
String algorithm,
int keySize) |
static KeyPair |
generateKeyPair(Provider provider,
String algorithm,
int keySize,
byte[] seed) |
static KeyPair |
generateKeyPair(Provider provider,
String algorithm,
int keySize,
byte[] seed,
AlgorithmParameterSpec... params) |
static KeyPair |
generateKeyPair(Provider provider,
String algorithm,
int keySize,
SecureRandom random,
AlgorithmParameterSpec... params) |
static KeyPair |
generateKeyPair(String algorithm)
生成用于非对称加密的公钥和私钥,仅用于非对称加密
|
static KeyPair |
generateKeyPair(String algorithm,
AlgorithmParameterSpec params)
生成用于非对称加密的公钥和私钥
|
static KeyPair |
generateKeyPair(String algorithm,
byte[] seed,
AlgorithmParameterSpec param)
生成用于非对称加密的公钥和私钥
|
static KeyPair |
generateKeyPair(String algorithm,
int keySize)
生成用于非对称加密的公钥和私钥
|
static KeyPair |
generateKeyPair(String algorithm,
int keySize,
byte[] seed)
生成用于非对称加密的公钥和私钥
|
static KeyPair |
generateKeyPair(String algorithm,
int keySize,
byte[] seed,
AlgorithmParameterSpec... params)
生成用于非对称加密的公钥和私钥
|
static KeyPair |
generateKeyPair(String algorithm,
int keySize,
SecureRandom random,
AlgorithmParameterSpec... params)
生成用于非对称加密的公钥和私钥
密钥对生成算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyPairGenerator 对于非对称加密算法,密钥长度有严格限制,具体如下: RSA: RS256、PS256:2048 bits RS384、PS384:3072 bits RS512、RS512:4096 bits EC(Elliptic Curve): EC256:256 bits EC384:384 bits EC512:512 bits |
static KeyPair |
generateKeyPair(String provider,
String algorithm) |
static KeyPair |
generateKeyPair(String provider,
String algorithm,
AlgorithmParameterSpec params) |
static KeyPair |
generateKeyPair(String provider,
String algorithm,
byte[] seed,
AlgorithmParameterSpec param) |
static KeyPair |
generateKeyPair(String provider,
String algorithm,
int keySize) |
static KeyPair |
generateKeyPair(String provider,
String algorithm,
int keySize,
byte[] seed) |
static KeyPair |
generateKeyPair(String provider,
String algorithm,
int keySize,
byte[] seed,
AlgorithmParameterSpec... params) |
static KeyPair |
generateKeyPair(String provider,
String algorithm,
int keySize,
SecureRandom random,
AlgorithmParameterSpec... params) |
static SecretKey |
generatePBEKey(Provider provider,
String algorithm,
char[] key) |
static SecretKey |
generatePBEKey(String algorithm,
char[] key)
生成PBE
SecretKey |
static SecretKey |
generatePBEKey(String provider,
String algorithm,
char[] key) |
static PrivateKey |
generatePrivateKey(Provider provider,
String algorithm,
byte[] key) |
static PrivateKey |
generatePrivateKey(Provider provider,
String algorithm,
KeySpec keySpec) |
static PrivateKey |
generatePrivateKey(String algorithm,
byte[] key)
生成私钥,仅用于非对称加密
采用PKCS#8规范,此规范定义了私钥信息语法和加密私钥语法 |
static PrivateKey |
generatePrivateKey(String algorithm,
KeySpec keySpec)
生成私钥,仅用于非对称加密
|
static PrivateKey |
generatePrivateKey(String provider,
String algorithm,
byte[] key) |
static PrivateKey |
generatePrivateKey(String provider,
String algorithm,
KeySpec keySpec) |
static PublicKey |
generatePublicKey(Provider provider,
String algorithm,
byte[] key) |
static PublicKey |
generatePublicKey(Provider provider,
String algorithm,
KeySpec keySpec) |
static PublicKey |
generatePublicKey(String algorithm,
byte[] key)
生成公钥,仅用于非对称加密
采用X509证书规范 |
static PublicKey |
generatePublicKey(String algorithm,
KeySpec keySpec)
生成公钥,仅用于非对称加密
|
static PublicKey |
generatePublicKey(String provider,
String algorithm,
byte[] key) |
static PublicKey |
generatePublicKey(String provider,
String algorithm,
KeySpec keySpec) |
static PrivateKey |
generateRSAPrivateKey(byte[] key)
生成RSA私钥,仅用于非对称加密
采用PKCS#8规范,此规范定义了私钥信息语法和加密私钥语法 |
static PrivateKey |
generateRSAPrivateKey(Provider provider,
byte[] key) |
static PrivateKey |
generateRSAPrivateKey(String provider,
byte[] key) |
static PublicKey |
generateRSAPublicKey(byte[] key)
生成RSA公钥,仅用于非对称加密
采用X509证书规范 |
static PublicKey |
generateRSAPublicKey(Provider provider,
byte[] key) |
static PublicKey |
generateRSAPublicKey(String provider,
byte[] key) |
static String |
getAlgorithmAfterWith(String algorithm)
获取用于密钥生成的算法
获取XXXwithXXX算法的后半部分算法,如果为ECDSA或SM2,返回算法为EC |
static Certificate |
getCertificate(KeyStore keyStore,
String alias) |
static CertificateFactory |
getCertificateFactory(String type) |
static Cipher |
getCipher(String algorithm) |
static Cipher |
getCipher(String algorithm,
Provider provider) |
static Cipher |
getCipher(String algorithm,
String provider) |
static KeyFactory |
getKeyFactory(String algorithm) |
static KeyFactory |
getKeyFactory(String algorithm,
Provider provider) |
static KeyFactory |
getKeyFactory(String algorithm,
String provider) |
static KeyGenerator |
getKeyGenerator(String algorithm) |
static KeyGenerator |
getKeyGenerator(String algorithm,
Provider provider) |
static KeyGenerator |
getKeyGenerator(String algorithm,
String provider) |
static KeyPair |
getKeyPair(KeyStore keyStore,
char[] password,
String alias)
从KeyStore中获取私钥公钥
|
static KeyPair |
getKeyPair(String type,
InputStream in,
char[] password,
String alias)
从KeyStore中获取私钥公钥
|
static KeyPairGenerator |
getKeyPairGenerator(String algorithm) |
static KeyPairGenerator |
getKeyPairGenerator(String algorithm,
Provider provider) |
static KeyPairGenerator |
getKeyPairGenerator(String algorithm,
String provider) |
static KeyStore |
getKeyStore(String type)
获取
KeyStore对象 |
static String |
getMainAlgorithm(String algorithm)
获取主体算法名,例如RSA/ECB/PKCS1Padding的主体算法是RSA
|
static SecretKeyFactory |
getSecretKeyFactory(String algorithm) |
static SecretKeyFactory |
getSecretKeyFactory(String algorithm,
Provider provider) |
static SecretKeyFactory |
getSecretKeyFactory(String algorithm,
String provider) |
static Signature |
getSignature(String algorithm) |
static Signature |
getSignature(String algorithm,
Provider provider) |
static Signature |
getSignature(String algorithm,
String provider) |
static Certificate |
readCertificate(String type,
InputStream in) |
static Certificate |
readCertificate(String type,
InputStream in,
char[] password,
String alias) |
static KeyStore |
readJKSKeyStore(File keyFile,
char[] password)
读取密钥库(Java Key Store,JKS) KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
static KeyStore |
readJKSKeyStore(InputStream in,
char[] password)
读取密钥库(Java Key Store,JKS) KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
static KeyStore |
readKeyStore(String type,
File keyFile,
char[] password)
读取KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
static KeyStore |
readKeyStore(String type,
InputStream in,
char[] password)
读取KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
static KeyStore |
readPKCS12KeyStore(File keyFile,
char[] password)
读取PKCS12 KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
static KeyStore |
readPKCS12KeyStore(InputStream in,
char[] password)
读取PKCS12 KeyStore文件
KeyStore文件用于数字证书的密钥对保存 |
static PrivateKey |
readPrivateKey(KeyStore keyStore,
String alias,
char[] password)
生成私钥,仅用于非对称加密
|
static PublicKey |
readPublicKeyByX509(InputStream in) |
static PublicKey |
readPublicKeyByX509(String x509File) |
static PublicKey |
readPublicKeyFile(String algorithm,
String file) |
static Certificate |
readX509Certificate(InputStream in)
读取X.509 Certification文件
|
static Certificate |
readX509Certificate(InputStream in,
char[] password,
String alias)
读取X.509 Certification文件
|
static PrivateKey |
toPrivateKey(Provider provider,
String algorithm,
byte[] key) |
static PrivateKey |
toPrivateKey(String algorithm,
byte[] key) |
static PrivateKey |
toPrivateKey(String provider,
String algorithm,
byte[] key) |
static PublicKey |
toPublicKey(Provider provider,
String algorithm,
byte[] key) |
static PublicKey |
toPublicKey(String algorithm,
byte[] key) |
static PublicKey |
toPublicKey(String provider,
String algorithm,
byte[] key) |
static RSAPrivateKey |
toRSAPrivateKey(byte[] modulus,
byte[] publicExponent) |
static RSAPrivateKey |
toRSAPrivateKey(Provider provider,
RSAPublicKey rsaPublicKey) |
static RSAPrivateKey |
toRSAPrivateKey(RSAPublicKey rsaPublicKey) |
static RSAPrivateKey |
toRSAPrivateKey(String provider,
RSAPublicKey rsaPublicKey) |
static RSAPublicKey |
toRSAPublicKey(byte[] modulus,
byte[] publicExponent) |
static RSAPublicKey |
toRSAPublicKey(Provider provider,
RSAPrivateKey rsaPrivateKey) |
static RSAPublicKey |
toRSAPublicKey(RSAPrivateKey rsaPrivateKey) |
static RSAPublicKey |
toRSAPublicKey(String provider,
RSAPrivateKey rsaPrivateKey) |
public static final int DEFAULT_KEY_SIZE
public static KeyGenerator getKeyGenerator(String algorithm)
algorithm - 对称加密算法NoSuchAlgorithmExceptionpublic static KeyGenerator getKeyGenerator(String algorithm, String provider)
public static KeyGenerator getKeyGenerator(String algorithm, Provider provider)
public static KeyPairGenerator getKeyPairGenerator(String algorithm)
algorithm - 非对称加密算法NoSuchAlgorithmExceptionpublic static KeyPairGenerator getKeyPairGenerator(String algorithm, String provider)
public static KeyPairGenerator getKeyPairGenerator(String algorithm, Provider provider)
public static SecretKeyFactory getSecretKeyFactory(String algorithm)
algorithm - 对称加密算法NoSuchAlgorithmExceptionpublic static SecretKeyFactory getSecretKeyFactory(String algorithm, String provider)
public static SecretKeyFactory getSecretKeyFactory(String algorithm, Provider provider)
public static KeyFactory getKeyFactory(String algorithm)
algorithm - 非对称加密算法NoSuchAlgorithmExceptionpublic static KeyFactory getKeyFactory(String algorithm, String provider)
public static KeyFactory getKeyFactory(String algorithm, Provider provider)
public static String getMainAlgorithm(@Nonnull String algorithm)
algorithm - XXXwithXXX算法public static String getAlgorithmAfterWith(String algorithm)
algorithm - XXXwithXXX算法public static SecretKey generateKey(String algorithm)
SecretKey,仅用于对称加密和摘要算法密钥生成algorithm - 算法,支持PBE算法SecretKeypublic static SecretKey generateKey(String algorithm, int keySize)
SecretKey,仅用于对称加密和摘要算法密钥生成algorithm - 算法,支持PBE算法keySize - 密钥长度,<0表示不设定密钥长度,即使用默认长度SecretKeypublic static SecretKey generateKey(String algorithm, int keySize, SecureRandom random)
SecretKey,仅用于对称加密和摘要算法密钥生成algorithm - 算法,支持PBE算法keySize - 密钥长度,<0表示不设定密钥长度,即使用默认长度random - 随机数生成器,null表示默认SecretKeypublic static SecretKey generateKey(String provider, String algorithm, int keySize, SecureRandom random)
public static SecretKey generateKey(Provider provider, String algorithm, int keySize, SecureRandom random)
public static SecretKey generateKey(String algorithm, byte[] key)
SecretKey,仅用于对称加密和摘要算法密钥生成algorithm - 算法key - 密钥,如果为null 自动生成随机密钥SecretKeypublic static SecretKey generateKeyBySeed(String provider, String algorithm, byte[] seed)
public static SecretKey generateKeyBySeed(Provider provider, String algorithm, byte[] seed)
public static SecretKey generatePBEKey(String algorithm, char[] key)
SecretKeyalgorithm - PBE算法,包括:PBEWithMD5AndDES、PBEWithSHA1AndDESede、PBEWithSHA1AndRC2_40等key - 密钥SecretKeypublic static SecretKey generatePBEKey(String provider, String algorithm, char[] key)
public static SecretKey generatePBEKey(Provider provider, String algorithm, char[] key)
public static SecretKey generateDESKey(String algorithm, byte[] key)
SecretKeyalgorithm - DES算法,包括DES、DESede等key - 密钥SecretKeypublic static SecretKey generateDESKey(String provider, String algorithm, byte[] key)
public static SecretKey generateDESKey(Provider provider, String algorithm, byte[] key)
public static SecretKey generateKey(String algorithm, KeySpec keySpec)
SecretKey,仅用于对称加密和摘要算法public static SecretKey generateKey(Provider provider, String algorithm, KeySpec keySpec)
public static PrivateKey generateRSAPrivateKey(@Nonnull byte[] key)
key - 密钥,必须为DER编码存储PrivateKeypublic static PrivateKey generateRSAPrivateKey(String provider, @Nonnull byte[] key)
public static PrivateKey generateRSAPrivateKey(Provider provider, @Nonnull byte[] key)
public static PrivateKey generatePrivateKey(@Nonnull String algorithm, @Nonnull byte[] key)
algorithm - 算法,如RSA、EC、SM2等key - 密钥,PKCS#8格式PrivateKeypublic static PrivateKey generatePrivateKey(String provider, @Nonnull String algorithm, @Nonnull byte[] key)
public static PrivateKey generatePrivateKey(Provider provider, @Nonnull String algorithm, @Nonnull byte[] key)
public static PrivateKey generatePrivateKey(@Nonnull String algorithm, @Nonnull KeySpec keySpec)
algorithm - 算法,如RSA、EC、SM2等keySpec - KeySpecPrivateKeypublic static PrivateKey generatePrivateKey(String provider, @Nonnull String algorithm, @Nonnull KeySpec keySpec)
public static PrivateKey generatePrivateKey(Provider provider, @Nonnull String algorithm, @Nonnull KeySpec keySpec)
public static PublicKey generateRSAPublicKey(@Nonnull byte[] key)
key - 密钥,必须为DER编码存储PublicKeypublic static PublicKey generateRSAPublicKey(String provider, @Nonnull byte[] key)
public static PublicKey generateRSAPublicKey(Provider provider, @Nonnull byte[] key)
public static PublicKey generatePublicKey(String algorithm, byte[] key)
algorithm - 算法key - 密钥,必须为DER编码存储PublicKeypublic static PublicKey generatePublicKey(String provider, String algorithm, byte[] key)
public static PublicKey generatePublicKey(Provider provider, String algorithm, byte[] key)
public static PublicKey generatePublicKey(String algorithm, KeySpec keySpec)
public static PublicKey generatePublicKey(String provider, String algorithm, KeySpec keySpec)
public static PublicKey generatePublicKey(Provider provider, String algorithm, KeySpec keySpec)
public static KeyPair generateKeyPair(String algorithm)
algorithm - 非对称加密算法KeyPairpublic static KeyPair generateKeyPair(String algorithm, int keySize)
algorithm - 非对称加密算法keySize - 密钥模(modulus )长度KeyPairpublic static KeyPair generateKeyPair(String provider, String algorithm, int keySize)
public static KeyPair generateKeyPair(Provider provider, String algorithm, int keySize)
public static KeyPair generateKeyPair(String algorithm, int keySize, byte[] seed)
algorithm - 非对称加密算法keySize - 密钥模(modulus )长度seed - 种子KeyPairpublic static KeyPair generateKeyPair(String provider, String algorithm, int keySize, byte[] seed)
public static KeyPair generateKeyPair(Provider provider, String algorithm, int keySize, byte[] seed)
public static KeyPair generateKeyPair(String algorithm, AlgorithmParameterSpec params)
algorithm - 非对称加密算法params - AlgorithmParameterSpecKeyPairpublic static KeyPair generateKeyPair(String provider, String algorithm, AlgorithmParameterSpec params)
public static KeyPair generateKeyPair(Provider provider, String algorithm, AlgorithmParameterSpec params)
public static KeyPair generateKeyPair(String algorithm, byte[] seed, AlgorithmParameterSpec param)
algorithm - 非对称加密算法param - AlgorithmParameterSpecseed - 种子KeyPairpublic static KeyPair generateKeyPair(String provider, String algorithm, byte[] seed, AlgorithmParameterSpec param)
public static KeyPair generateKeyPair(Provider provider, String algorithm, byte[] seed, AlgorithmParameterSpec param)
public static KeyPair generateKeyPair(String algorithm, int keySize, byte[] seed, AlgorithmParameterSpec... params)
algorithm - 非对称加密算法keySize - 密钥模(modulus )长度(单位bit)seed - 种子params - AlgorithmParameterSpecKeyPairpublic static KeyPair generateKeyPair(String provider, String algorithm, int keySize, byte[] seed, AlgorithmParameterSpec... params)
public static KeyPair generateKeyPair(Provider provider, String algorithm, int keySize, byte[] seed, AlgorithmParameterSpec... params)
public static KeyPair generateKeyPair(String algorithm, int keySize, SecureRandom random, AlgorithmParameterSpec... params)
对于非对称加密算法,密钥长度有严格限制,具体如下:
RSA:
RS256、PS256:2048 bits RS384、PS384:3072 bits RS512、RS512:4096 bits
EC(Elliptic Curve):
EC256:256 bits EC384:384 bits EC512:512 bits
algorithm - 非对称加密算法keySize - 密钥模(modulus )长度(单位bit)random - SecureRandom 对象,创建时可选传入seedparams - AlgorithmParameterSpecKeyPairpublic static KeyPair generateKeyPair(String provider, String algorithm, int keySize, SecureRandom random, AlgorithmParameterSpec... params)
public static KeyPair generateKeyPair(Provider provider, String algorithm, int keySize, SecureRandom random, AlgorithmParameterSpec... params)
public static PrivateKey toPrivateKey(String algorithm, byte[] key)
public static PrivateKey toPrivateKey(String provider, String algorithm, byte[] key)
public static PrivateKey toPrivateKey(Provider provider, String algorithm, byte[] key)
public static RSAPrivateKey toRSAPrivateKey(RSAPublicKey rsaPublicKey)
public static RSAPrivateKey toRSAPrivateKey(String provider, RSAPublicKey rsaPublicKey)
public static RSAPrivateKey toRSAPrivateKey(Provider provider, RSAPublicKey rsaPublicKey)
public static RSAPublicKey toRSAPublicKey(RSAPrivateKey rsaPrivateKey)
public static RSAPublicKey toRSAPublicKey(String provider, RSAPrivateKey rsaPrivateKey)
public static RSAPublicKey toRSAPublicKey(Provider provider, RSAPrivateKey rsaPrivateKey)
public static RSAPrivateKey toRSAPrivateKey(byte[] modulus, byte[] publicExponent)
public static RSAPublicKey toRSAPublicKey(byte[] modulus, byte[] publicExponent)
public static PrivateKey readPrivateKey(KeyStore keyStore, String alias, char[] password)
keyStore - KeyStorealias - 别名password - 密码PrivateKeypublic static PublicKey readPublicKeyByX509(String x509File) throws IOException
IOExceptionpublic static PublicKey readPublicKeyByX509(InputStream in)
public static PublicKey readPublicKeyFile(String algorithm, String file) throws IOException
IOExceptionpublic static KeyStore readJKSKeyStore(File keyFile, char[] password) throws IOException
keyFile - 密钥库文件password - 密码KeyStoreIOExceptionpublic static KeyStore readJKSKeyStore(InputStream in, char[] password) throws IOException
in - 证书文件password - 密码KeyStoreIOExceptionpublic static KeyStore readPKCS12KeyStore(File keyFile, char[] password) throws IOException
keyFile - 证书文件password - 密码KeyStoreIOExceptionpublic static KeyStore readPKCS12KeyStore(InputStream in, char[] password) throws IOException
in - 证书文件password - 密码KeyStoreIOExceptionpublic static KeyStore readKeyStore(String type, File keyFile, char[] password) throws IOException
type - 类型keyFile - 证书文件password - 密码,null表示无密码KeyStoreIOExceptionpublic static KeyStore readKeyStore(String type, InputStream in, char[] password) throws IOException
type - 类型in - 证书文件password - 密码,null表示无密码KeyStoreIOExceptionpublic static KeyPair getKeyPair(String type, InputStream in, char[] password, String alias) throws IOException
type - 类型in - 证书文件password - 密码alias - 别名KeyPairIOExceptionpublic static KeyPair getKeyPair(KeyStore keyStore, char[] password, String alias)
public static Certificate readX509Certificate(InputStream in, char[] password, String alias) throws IOException
in - 证书文件password - 密码alias - 别名KeyStoreIOExceptionpublic static Certificate readX509Certificate(InputStream in)
public static Certificate readCertificate(String type, InputStream in, char[] password, String alias) throws IOException
IOExceptionpublic static Certificate readCertificate(String type, InputStream in)
public static Certificate getCertificate(KeyStore keyStore, String alias)
public static CertificateFactory getCertificateFactory(String type)
Copyright © 2024 fossc. All rights reserved.