public class KeyRep extends Object implements Serializable
注意,一个序列化的关键可能包含不应在不受信任的环境中暴露敏感信息。看到 Security Appendix序列化规范的更多信息。
Key
,
KeyFactory
,
SecretKeySpec
,
X509EncodedKeySpec
,
PKCS8EncodedKeySpec
,
Serialized Form
Modifier and Type | Class and Description |
---|---|
static class |
KeyRep.Type
关键型。
|
Constructor and Description |
---|
KeyRep(KeyRep.Type type, String algorithm, String format, byte[] encoded)
构建替代键类。
|
public KeyRep(KeyRep.Type type, String algorithm, String format, byte[] encoded)
type
- Type.SECRET,type.public的任何一个,或type.private
algorithm
-算法返回
Key.getAlgorithm()
format
-编码格式返回
Key.getFormat()
encoded
-编码的字节
Key.getEncoded()
归来
NullPointerException
如果类型是
null
,如果算法是
null
,如果格式是
null
,或者是
null
编码
protected Object readResolve() throws ObjectStreamException
此方法支持三种类型/格式组合:
ObjectStreamException
-如果类型/格式的组合是无法识别的,如果算法,密钥格式,或编码的关键字节识别/无效,如果关键的分辨率没有以任何理由
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.