A private key.
The purpose of this interface is to group (and provide type safety
for) all private key interfaces.
Note: The specialized private key interfaces extend this interface.
See, for example, the DSAPrivateKey interface in
java.security.interfaces.
Implementations should override the default destroy and
isDestroyed methods from the
Destroyable interface to enable
sensitive key information to be destroyed, cleared, or in the case
where such information is immutable, unreferenced.
Finally, since PrivateKey is Serializable, implementations
should also override
ObjectOutputStream.writeObject(java.lang.Object)
to prevent keys that have been destroyed from being serialized.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],["The `PrivateKey` interface groups all private key interfaces, providing type safety. It extends `Key` and `Destroyable`, requiring implementations to override `destroy` and `isDestroyed` for handling sensitive key data. Key actions include getting the algorithm, encoding, and format. `PrivateKey` implementations should also override `writeObject` to prevent the serialization of destroyed keys. Key subclasses include `DHPrivateKey`, `DSAPrivateKey`, `ECPrivateKey`, `RSAMultiPrimePrivateCrtKey`, `RSAPrivateCrtKey`, and `RSAPrivateKey`.\n"]]