|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.security.KeyPair
public final class KeyPair
此类是简单的密钥对(公钥和私钥)持有者。它没有增强任何安全性,另外初始化时应该将它当作 PrivateKey 对待。
PublicKey,
PrivateKey,
序列化表格| 构造方法摘要 | |
|---|---|
KeyPair(PublicKey publicKey,
PrivateKey privateKey)
根据给定的公钥和私钥构造密钥对。 |
|
| 方法摘要 | |
|---|---|
PrivateKey |
getPrivate()
返回对此密钥对的私钥组件的引用。 |
PublicKey |
getPublic()
返回对此密钥对的公钥组件的引用。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public KeyPair(PublicKey publicKey,
PrivateKey privateKey)
注意,此构造方法只在生成的密钥对中存储对公钥和私钥组件的引用。这是安全的,因为 Key 对象是不可变的。
publicKey - 公钥。privateKey - 私钥。| 方法详细信息 |
|---|
public PublicKey getPublic()
public PrivateKey getPrivate()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。