Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

Key

implements Serializable
java.security.Key
Known Indirect Subclasses

Class Overview

Key is the common interface for all keys.

Summary

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

Constants

public static final long serialVersionUID

Added in API level 1

The serialVersionUID to be compatible with JDK1.1.

Constant Value: 6603384152749567654 (0x5ba3eee69414eea6)

Public Methods

public abstract String getAlgorithm ()

Added in API level 1

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.

public abstract byte[] getEncoded ()

Added in API level 1

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.

public abstract String getFormat ()

Added in API level 1

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.