Note that a serialized Key may contain sensitive information which should not be exposed in untrusted environments. See the Security Appendix of the Java Object Serialization Specification for more information.
Key
, KeyFactory
, javax.crypto.spec.SecretKeySpec
, java.security.spec.X509EncodedKeySpec
, java.security.spec.PKCS8EncodedKeySpec
Modifier and Type | Class and Description |
---|---|
public static enum | KeyRep.
Key type. |
Modifier and Type | Field and Description |
---|---|
private final String | algorithm
The Key algorithm |
private final byte[] | encoded
The encoded Key bytes |
private final String | format
The Key encoding format |
private static final String | |
private static final String | |
private static final long | |
private final KeyRep. | type
Either one of Type.SECRET, Type.PUBLIC, or Type.PRIVATE |
private static final String |
Access | Constructor and Description |
---|---|
public | KeyRep(KeyRep.
either one of Type.SECRET, Type.PUBLIC, or Type.PRIVATE type,the algorithm returned from
algorithm, String Key.getAlgorithm() the encoding format returned from
format, byte[] Key.getFormat() the encoded bytes returned from
encoded)Key.getEncoded() Construct the alternate Key class. |
Modifier and Type | Method and Description |
---|---|
protected Object |
algorithm | back to summary |
---|---|
private final String algorithm The Key algorithm |
encoded | back to summary |
---|---|
private final byte[] encoded The encoded Key bytes |
format | back to summary |
---|---|
private final String format The Key encoding format |
PKCS8 | back to summary |
---|---|
private static final String PKCS8 |
RAW | back to summary |
---|---|
private static final String RAW |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID
|
type | back to summary |
---|---|
private final KeyRep. Either one of Type.SECRET, Type.PUBLIC, or Type.PRIVATE |
X509 | back to summary |
---|---|
private static final String X509 |
KeyRep | back to summary |
---|---|
public KeyRep(KeyRep. Construct the alternate Key class.
|
readResolve | back to summary |
---|---|
protected Object readResolve() throws ObjectStreamException Resolve the Key object. This method supports three Type/format combinations:
|
Modifier and Type | Field and Description |
---|---|
public static final KeyRep. | PRIVATE
Type for private keys. |
public static final KeyRep. | PUBLIC
Type for public keys. |
public static final KeyRep. | SECRET
Type for secret keys. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static KeyRep. | |
public static KeyRep. |
PRIVATE | back to summary |
---|---|
public static final KeyRep. Type for private keys. |
PUBLIC | back to summary |
---|---|
public static final KeyRep. Type for public keys. |
SECRET | back to summary |
---|---|
public static final KeyRep. Type for secret keys. |
Type | back to summary |
---|---|
private Type() |
valueOf | back to summary |
---|---|
public static KeyRep. |
values | back to summary |
---|---|
public static KeyRep. |