opencard.opt.security
Class DESKey

java.lang.Object
  extended by opencard.opt.security.DESKey
All Implemented Interfaces:
java.io.Serializable, java.security.Key

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

Encapsulates a DES key.

Version:
$Id: DESKey.java,v 1.2 1999/10/20 13:15:00 damke Exp $
Author:
Michael Baentsch (mib@zurich.ibm.com), Roland Weber (rolweber@de.ibm.com)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface java.security.Key
serialVersionUID
 
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