de.cscc.crypto.provider.spec
Class DESOperationModeInitializationVectorSpec

java.lang.Object
  extended byde.cscc.crypto.provider.spec.DESOperationModeInitializationVectorSpec
All Implemented Interfaces:
AlgorithmParameterSpec, Cloneable

public class DESOperationModeInitializationVectorSpec
extends Object
implements AlgorithmParameterSpec, Cloneable

DES Initialization Vector (64 bit) class.

This class is immutable.

Version:
$Revision: 1.7 $
Author:
Uwe Günther

Constructor Summary
DESOperationModeInitializationVectorSpec(byte[] iv)
          Creates a new DESOperationModeInitializationVectorSpec.
DESOperationModeInitializationVectorSpec(byte[] iv, int offset)
          Creates a new DESOperationModeInitializationVectorSpec.
DESOperationModeInitializationVectorSpec(DESOperationModeInitializationVectorSpec iv)
          Creates a new DESOperationModeInitializationVectorSpec from an existing one.
 
Method Summary
 Object clone()
          Creates and returns a deep copy of this object.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 byte[] getIv()
          Returns the initialization vector.
 int hashCode()
          Returns a hash code value for the object.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DESOperationModeInitializationVectorSpec

public DESOperationModeInitializationVectorSpec(byte[] iv)
                                         throws IllegalBlockSizeException
Creates a new DESOperationModeInitializationVectorSpec.

Parameters:
iv - the initialization vector to set.
Throws:
IllegalBlockSizeException - if length of iv shorter than 8 bytes. If it is longer, we use only the first 8 bytes from iv.

DESOperationModeInitializationVectorSpec

public DESOperationModeInitializationVectorSpec(byte[] iv,
                                                int offset)
                                         throws IllegalBlockSizeException
Creates a new DESOperationModeInitializationVectorSpec.

Parameters:
iv - the initialization vector to set.
offset - the offset in iv, where iv starts.
Throws:
IllegalBlockSizeException - if length of iv shorter than offset+8 bytes. If it is longer, we use only the first 8 bytes from iv, starting at offset.

DESOperationModeInitializationVectorSpec

public DESOperationModeInitializationVectorSpec(DESOperationModeInitializationVectorSpec iv)
Creates a new DESOperationModeInitializationVectorSpec from an existing one.

Parameters:
iv - the initialization vector to set.
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Creates and returns a deep copy of this object.

Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
See Also:
Cloneable

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hash code value for the object.

Returns:
a hash code value for this object.
See Also:
equals(java.lang.Object), Hashtable

toString

public String toString()
Returns a string representation of the object.

Returns:
a string representation of the object.

getIv

public byte[] getIv()
Returns the initialization vector.

Returns:
a initialization vector as byte[8].


Copyright © 2001, 2002 by Uwe GŁnther. See the COPYING file for more details. Browse the source as HTML.