FileDocCategorySizeDatePackage
EncodedKeySpec.javaAPI DocAndroid 1.5 API2237Wed May 06 22:41:06 BST 2009java.security.spec

EncodedKeySpec

public abstract class EncodedKeySpec extends Object implements KeySpec
The abstract key specification for a public or a private key in encoded format.
since
Android 1.0

Fields Summary
private final byte[]
encodedKey
Constructors Summary
public EncodedKeySpec(byte[] encodedKey)
Creates a new {@code EncodedKeySpec} with the specified encoded key bytes.

param
encodedKey the encoded key bytes.
since
Android 1.0

        // Defensively copies parameter
        // to prevent subsequent modification
        this.encodedKey = new byte[encodedKey.length];
        System.arraycopy(encodedKey, 0,
                this.encodedKey, 0, this.encodedKey.length);
    
Methods Summary
public byte[]getEncoded()
Returns the encoded key bytes.

return
the encoded key bytes.
since
Android 1.0

        // Defensively copies private array
        // to prevent subsequent modification
        byte[] ret = new byte[encodedKey.length];
        System.arraycopy(encodedKey, 0, ret, 0, ret.length);
        return ret;
    
public abstract java.lang.StringgetFormat()
Returns the name of the encoding format of this encoded key specification.

return
the name of the encoding format of this encoded key specification.
since
Android 1.0