public class KeyPair
extends java.lang.Object
Instances of this class are immutable.
Constructor and Description |
---|
KeyPair()
Creates a key pair using a newly-generated private key.
|
KeyPair(Key privateKey)
Creates a key pair using an existing private key.
|
Modifier and Type | Method and Description |
---|---|
Key |
getPrivateKey()
Returns the private key from the key pair.
|
Key |
getPublicKey()
Returns the public key from the key pair.
|
public KeyPair()
public KeyPair(Key privateKey)
privateKey
- a private key, used to derive the public key