|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.security.spec.EncodedKeySpec
java.security.spec.PKCS8EncodedKeySpec
public class PKCS8EncodedKeySpec
此类表示按照 ASN.1 类型 PrivateKeyInfo 进行编码的专用密钥的 ASN.1 编码。PKCS#8 中定义的 PrivateKeyInfo 语法如下:
PrivateKeyInfo ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
attributes [0] IMPLICIT Attributes OPTIONAL }
Version ::= INTEGER
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
PrivateKey ::= OCTET STRING
Attributes ::= SET OF Attribute
Key,
KeyFactory,
KeySpec,
EncodedKeySpec,
X509EncodedKeySpec| 构造方法摘要 | |
|---|---|
PKCS8EncodedKeySpec(byte[] encodedKey)
根据给定的编码密钥创建一个新的 PKCS8EncodedKeySpec。 |
|
| 方法摘要 | |
|---|---|
byte[] |
getEncoded()
返回按照 PKCS #8 标准编码的密钥字节。 |
String |
getFormat()
返回与此密钥规范关联的编码格式的名称。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public PKCS8EncodedKeySpec(byte[] encodedKey)
encodedKey - 假设按照 PKCS #8 标准对其进行编码的密钥。复制数组的内容,以防随后的修改。
NullPointerException - 如果 encodedKey 为 null。| 方法详细信息 |
|---|
public byte[] getEncoded()
EncodedKeySpec 中的 getEncodedpublic final String getFormat()
EncodedKeySpec 中的 getFormat"PKCS#8"。
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。