Android 2.3 Gingerbread

java.security
Interface Key

All Superinterfaces:
Serializable
All Known Subinterfaces:
DHPrivateKey, DHPublicKey, DSAPrivateKey, DSAPublicKey, ECPrivateKey, ECPublicKey, PBEKey, PrivateKey, PublicKey, RSAMultiPrimePrivateCrtKey, RSAPrivateCrtKey, RSAPrivateKey, RSAPublicKey, SecretKey
All Known Implementing Classes:
SecretKeySpec

public interface Key
extends Serializable

Key is the common interface for all keys.

See Also:
PublicKey, PrivateKey

Field Summary
static long serialVersionUID
          The serialVersionUID to be compatible with JDK1.1.
 
Method Summary
 String getAlgorithm()
          Returns the name of the algorithm of this key.
 byte[] getEncoded()
          Returns the encoded form of this key, or null if encoding is not supported by this key.
 String getFormat()
          Returns the name of the format used to encode this key, or null if it can not be encoded.
 

Field Detail

serialVersionUID

static final long serialVersionUID
The serialVersionUID to be compatible with JDK1.1.

See Also:
Constant Field Values
Method Detail

getAlgorithm

String getAlgorithm()
Returns the name of the algorithm of this key. If the algorithm is unknown, null is returned.

Returns:
the name of the algorithm of this key or null if the algorithm is unknown.

getFormat

String getFormat()
Returns the name of the format used to encode this key, or null if it can not be encoded.

Returns:
the name of the format used to encode this key, or null if it can not be encoded.

getEncoded

byte[] getEncoded()
Returns the encoded form of this key, or null if encoding is not supported by this key.

Returns:
the encoded form of this key, or null if encoding is not supported by this key.

Android 2.3 Gingerbread