|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.transport.security.KeyPair
public final class KeyPair
Valid and encodeable certificate, including signed public key and private key
This class aggregates private and public keys.
TODO Use KeyPair Instead?
| Field Summary | |
|---|---|
Cert |
certificate
|
PrivKey |
privateKey
|
| Constructor Summary | |
|---|---|
KeyPair(Cert certificate,
PrivKey privateKey)
Constructor for KeyPair. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final Cert certificate
public final PrivKey privateKey
| Constructor Detail |
|---|
public KeyPair(Cert certificate,
PrivKey privateKey)
Constructor for KeyPair.
certificate - a Cert object.privateKey - a PrivKey object.| Method Detail |
|---|
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 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 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.public Cert getCertificate()
Getter for the field certificate.
Cert object.public PrivKey getPrivateKey()
Getter for the field privateKey.
PrivKey object.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||