public class PEMs extends Securitys
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
OPENSSL_DSA |
static String |
OPENSSL_DSA_PARAMS |
static String |
OPENSSL_EC |
static String |
OPENSSL_EC_PARAMS |
static String |
PKCS1 |
static String |
PKCS8 |
static String |
PKCS8_ENCRYPTED |
| 限定符和类型 | 方法和说明 |
|---|---|
static GenericRegistry<PemKeyFormat> |
getDefaultPemStyleRegistry() |
static List<Certificate> |
readCertificates(Collection<File> certFiles) |
static PrivateKey |
readPrivateKey(BufferedReader pemKeyFile,
Supplier0<char[]> passwordSupplier) |
static PrivateKey |
readPrivateKey(File keyFile,
Supplier0<char[]> passwordSupplier)
Creates a
PrivateKey from the contents of a file. |
addProvider, getLangxSecurityProvider, getProvider, getSecureRandom, insertProvider, insertProviderAt, langxProviderInstalled, loadLangxProvider, setuppublic static GenericRegistry<PemKeyFormat> getDefaultPemStyleRegistry()
public static PrivateKey readPrivateKey(File keyFile, Supplier0<char[]> passwordSupplier) throws GeneralSecurityException
PrivateKey from the contents of a file. Supports PKCS#1, PKCS#8
encoded formats of encrypted and plaintext RSA, DSA and EC(secp256r1) keyskeyFile - the private key filepasswordSupplier - A password supplier for the potentially encrypted (password protected) keyGeneralSecurityExceptionpublic static PrivateKey readPrivateKey(BufferedReader pemKeyFile, Supplier0<char[]> passwordSupplier) throws GeneralSecurityException
public static List<Certificate> readCertificates(Collection<File> certFiles) throws CertificateException
Copyright © 2021. All rights reserved.