public final class KeyPair extends Object implements Serializable
PublicKey , PrivateKey , Serialized Form
| Constructor and Description |
|---|
KeyPair(PublicKey publicKey, PrivateKey privateKey)
从给定的公钥和私钥构造一个密钥对。
|
public KeyPair(PublicKey publicKey, PrivateKey privateKey)
请注意,此构造函数仅存储对生成的密钥对中的公钥和私钥组件的引用。 这是安全的,因为Key对象是不可变的。
publicKey - 公钥。
privateKey - 私钥。
public PublicKey getPublic()
public PrivateKey getPrivate()