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()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.