FileDocCategorySizeDatePackage
Key.javaAPI DocphoneME MR2 API (J2ME)2429Wed May 02 18:00:24 BST 2007com.sun.midp.crypto

Key

public abstract interface Key
Implements an abstract class that represents all keys (both symmetric and asymmetric).

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetAlgorithm()
Returns the name of the algorithm associated with this secret key.

return
the secret key algorithm.

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

return
the encoded key, or null if the key does not support encoding.

public java.lang.StringgetFormat()
Returns the name of the primary encoding format of this key, or null if this key does not support encoding. The primary encoding format is named in terms of the appropriate ASN.1 data format, if an ASN.1 specification for this key exists. For example, the name of the ASN.1 data format for public keys is SubjectPublicKeyInfo, as defined by the X.509 standard; in this case, the returned format is "X.509". Similarly, the name of the ASN.1 data format for private keys is PrivateKeyInfo, as defined by the PKCS #8 standard; in this case, the returned format is "PKCS#8".

return
the primary encoding format of the key.