com.motorola.iden.security
Interface Key

All Known Subinterfaces:
PrivateKey, PublicKey

public interface Key

The Key interface is the top-level interface for all keys. It defines the functionality shared by all key objects. All keys have three characteristics:

See Also:
PublicKey, PrivateKey

Method Summary
 java.lang.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.
 java.lang.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

public java.lang.String getAlgorithm()
Returns the standard algorithm name for this key. For example, "DSA" would indicate that this key is a DSA key.
Returns:
the name of the algorithm associated with this key.

getFormat

public java.lang.String getFormat()
Returns the name of the primary encoding format of this key, or null if this key does not support encoding.
Returns:
the primary encoding format of the key.

getEncoded

public byte[] getEncoded()
Returns the key in its primary encoding format, or null if this key does not support encoding.
Returns:
the encoded key, or null if the key does not support encoding.