GeezerVison is showing docs.oracle.com — Key (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact1, compact2, compact3
java.security
Interface Key
-
-
Field Summary
Fields
| Modifier and Type |
Field |
Description |
static long |
serialVersionUID |
The class fingerprint that is set to indicate
serialization compatibility with a previous
version of the class.
|
-
Method Summary
All Methods Instance Methods Abstract Methods
| Modifier and Type |
Method |
Description |
String |
getAlgorithm() |
Returns the standard algorithm name for this key.
|
byte[] |
getEncoded() |
Returns the key in its primary encoding format, or null
if this key does not support encoding.
|
String |
getFormat() |
Returns the name of the primary encoding format of this key,
or null if this key does not support encoding.
|
-
-
Method Detail
-
getAlgorithm
String getAlgorithm()
- Returns:
- the name of the algorithm associated with this key.
-
getFormat
String getFormat()
Returns the name of the primary encoding format of this key,
or null if this key does not support encoding.
The primary encoding format is
named in terms of the appropriate ASN.1 data format, if an
ASN.1 specification for this key exists.
For example, the name of the ASN.1 data format for public
keys is SubjectPublicKeyInfo, as
defined by the X.509 standard; in this case, the returned format is
"X.509". Similarly,
the name of the ASN.1 data format for private keys is
PrivateKeyInfo,
as defined by the PKCS #8 standard; in this case, the returned format is
"PKCS#8".
- Returns:
- the primary encoding format of the key.
Java™ Platform Standard Ed. 8
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, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|