| Modifier and Type | Field and Description |
|---|---|
Cert |
certificate |
PrivKey |
privateKey |
| Constructor and Description |
|---|
KeyPair(Cert certificate,
PrivKey privateKey)
Constructor for KeyPair.
|
| Modifier and Type | Method and Description |
|---|---|
Cert |
getCertificate()
Getter for the field
certificate. |
PrivKey |
getPrivateKey()
Getter for the field
privateKey. |
static KeyPair |
load(File certificateFile,
File privateKeyFile,
String privateKeyPassword)
Load Certificate and Private key pair from X.509 and keystore file
|
static KeyPair |
load(URL certificateFile,
URL privateKeyFile,
String privateKeyPassword)
Load Certificate and Private key pair from X.509 and keystore file
|
void |
save(File certificateFile,
File privateKeyFile)
save.
|
void |
save(File certificateFile,
File privateKeyFile,
String privateKeyPassword)
save.
|
String |
toString() |
public static KeyPair load(File certificateFile, File privateKeyFile, String privateKeyPassword) throws IOException, UnrecoverableKeyException, NoSuchAlgorithmException, CertificateException, KeyStoreException
certificateFile - a File object.privateKeyFile - a File object.privateKeyPassword - a String object.IOException - if any.KeyStoreException - if any.CertificateException - if any.NoSuchAlgorithmException - if any.UnrecoverableKeyException - if any.public static KeyPair load(URL certificateFile, URL privateKeyFile, String privateKeyPassword) throws IOException, UnrecoverableKeyException, NoSuchAlgorithmException, CertificateException, KeyStoreException
certificateFile - a URL object.privateKeyFile - a URL object.privateKeyPassword - a String object.IOException - if any.KeyStoreException - if any.CertificateException - if any.NoSuchAlgorithmException - if any.UnrecoverableKeyException - if any.public Cert getCertificate()
Getter for the field certificate.
Cert object.public PrivKey getPrivateKey()
Getter for the field privateKey.
PrivKey object.public void save(File certificateFile, File privateKeyFile) throws IOException
save.
certificateFile - a File object.privateKeyFile - a File object.IOException - if any.public void save(File certificateFile, File privateKeyFile, String privateKeyPassword) throws IOException
save.
certificateFile - a File object.privateKeyFile - a File object.privateKeyPassword - a String object.IOException - if any.Copyright © 2026. All rights reserved.