opencard.opt.security
Class DESKey

java.lang.Object
  |
  +--opencard.opt.security.DESKey

public class DESKey
extends java.lang.Object
implements java.security.Key

Encapsulates a DES key.

See Also:
Serialized Form

Constructor Summary
DESKey(byte[] data)
          Instantiates a DESKey from the given byte array.
 
Method Summary
 byte[] body()
          Returns the key data.
 java.lang.String getAlgorithm()
          Conformance to the java.security interface
 byte[] getBytes()
          Returns the key data.
 byte[] getEncoded()
          Conformance to the java.security interface
 java.lang.String getFormat()
          Conformance to the java.security interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DESKey

public DESKey(byte[] data)
Instantiates a DESKey from the given byte array. A clone of the array is stored for later access.
Parameters:
data - byte array holding the key to encapsulate
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Conformance to the java.security interface
Specified by:
getAlgorithm in interface java.security.Key

getFormat

public java.lang.String getFormat()
Conformance to the java.security interface
Specified by:
getFormat in interface java.security.Key

getEncoded

public byte[] getEncoded()
Conformance to the java.security interface
Specified by:
getEncoded in interface java.security.Key

getBytes

public byte[] getBytes()
Returns the key data. The key data returned here must not be changed.
Returns:
byte array holding the encapsulated DES key

body

public byte[] body()
Returns the key data. The key data returned here must not be changed.
Returns:
byte array holding the encapsulated DES key