public abstract class EncodedKeySpec extends Object implements KeySpec
Key
, KeyFactory
, KeySpec
, X509EncodedKeySpec
, PKCS8EncodedKeySpec
Constructor and Description |
---|
EncodedKeySpec(byte[] encodedKey)
用给定的编码密钥创建一个新的EncodedKeySpec。
|
public EncodedKeySpec(byte[] encodedKey)
encodedKey
- 编码密钥。
复制数组的内容以防止后续修改。
NullPointerException
- 如果
encodedKey
为空。
public byte[] getEncoded()
public abstract String getFormat()
如果密钥的不透明表示(参见Key
)可以转换(参见KeyFactory
)到此密钥规范(或其子类)中, getFormat
在不透明密钥上调用的getFormat
返回与该密钥规范的getFormat
方法相同的值。
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.