所有类
java.security.spec
类 X509EncodedKeySpec
java.lang.Object
java.security.spec.EncodedKeySpec
java.security.spec.X509EncodedKeySpec
- 所有已实现的接口:
- KeySpec
public class X509EncodedKeySpec
- extends EncodedKeySpec
此类表示根据 ASN.1 类型 SubjectPublicKeyInfo
进行编码的公用密钥的 ASN.1 编码。X.509 标准中定义的 SubjectPublicKeyInfo
语法如下:
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING }
- 从以下版本开始:
- 1.2
- 另请参见:
Key
, KeyFactory
, KeySpec
, EncodedKeySpec
, PKCS8EncodedKeySpec
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
X509EncodedKeySpec
public X509EncodedKeySpec(byte[] encodedKey)
- 根据给定的编码密钥创建一个新的 X509EncodedKeySpec。
- 参数:
encodedKey
- 假设按照 X.509 标准对其进行编码的密钥。复制数组的内容,以防随后进行修改。
getEncoded
public byte[] getEncoded()
- 返回按照 X.509 标准进行编码的密钥的字节。
- 覆盖:
- 类
EncodedKeySpec
中的 getEncoded
- 返回:
- 密钥的 X.509 编码。每次调用此方法时,都返回一个新数组。
getFormat
public final String getFormat()
- 返回与此密钥规范关联的编码格式的名称。
- 指定者:
- 类
EncodedKeySpec
中的 getFormat
- 返回:
- 字符串
"X.509"
。
所有类