public interface Key extends Serializable
Serializable
, all
keys may be serialized. Keys are generally obtained through key generators,
including KeyFactory
.PublicKey
,
PrivateKey
,
KeyPair
,
KeyPairGenerator
,
KeyFactory
,
KeySpec
,
Identity
,
Signer
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID
The version identifier used for serialization.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm()
This method returns the name of the algorithm for this key.
|
byte[] |
getEncoded()
This method returns the encoded form of the key.
|
String |
getFormat()
This method returns the name of the encoding format for this key.
|
static final long serialVersionUID
String getAlgorithm()
String
such as "RSA".String getFormat()
null
if this key
does not have an encoding format.byte[] getEncoded()
null
.