public interface PrivateKey extends Key, Destroyable
注意:专用的私钥接口扩展了这个接口。看到的,例如,在java.security.interfaces
的DSAPrivateKey
接口。
实现应该重写默认的destroy
和isDestroyed
方法从Destroyable
接口使敏感的关键信息被破坏、清除,或在的情况下,这样的信息是不可变的,无用的。最后,由于PrivateKey
是Serializable
,实现应该覆盖ObjectOutputStream.writeObject(java.lang.Object)
防止已序列化销毁密钥。
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID
设置为表示与类的前一个版本的序列化兼容性的类的指纹。
|
getAlgorithm, getEncoded, getFormat
destroy, isDestroyed
static final long serialVersionUID
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.