Build 1.0_r1(from source)

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

Defines the basic properties of all key objects.

See Also:
PublicKey

Field Summary
static long serialVersionUID
           
 
Method Summary
 String getAlgorithm()
          Returns the name of the algorithm that this key will work with.
 byte[] getEncoded()
          Returns the encoded form of the receiver.
 String getFormat()
          Returns the name of the format used to encode the key, or null if it can not be encoded.
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

getAlgorithm

String getAlgorithm()
Returns the name of the algorithm that this key will work with. If the algorithm is unknown, it returns null.

Returns:
String the receiver's algorithm

getFormat

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

Returns:
String the receiver's encoding format

getEncoded

byte[] getEncoded()
Returns the encoded form of the receiver.

Returns:
byte[] the encoded form of the receiver

Build 1.0_r1(from source)

Please submit a feedback, bug or feature