Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.security.spec
Class EncodedKeySpec  view EncodedKeySpec download EncodedKeySpec.java

java.lang.Object
  extended byjava.security.spec.EncodedKeySpec
All Implemented Interfaces:
KeySpec
Direct Known Subclasses:
PKCS8EncodedKeySpec, X509EncodedKeySpec

public abstract class EncodedKeySpec
extends java.lang.Object
implements KeySpec

Encoded Key Specification class which is used to store byte encoded keys.

Since:
JDK 1.2

Field Summary
private  byte[] encodedKey
           
 
Constructor Summary
EncodedKeySpec(byte[] encodedKey)
          Constructs a new EncodedKeySpec with the specified encoded key.
 
Method Summary
 byte[] getEncoded()
          Gets the encoded key in byte format.
abstract  java.lang.String getFormat()
          Returns the name of the key format used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encodedKey

private byte[] encodedKey
Constructor Detail

EncodedKeySpec

public EncodedKeySpec(byte[] encodedKey)
Constructs a new EncodedKeySpec with the specified encoded key.

Method Detail

getEncoded

public byte[] getEncoded()
Gets the encoded key in byte format.


getFormat

public abstract java.lang.String getFormat()
Returns the name of the key format used. This name is the format such as "PKCS#8" or "X.509" which if it matches a Key class name of the same type can be transformed using the apporiate KeyFactory.