public class RC2ParameterSpec extends Object implements AlgorithmParameterSpec
| Constructor and Description |
|---|
RC2ParameterSpec(int effectiveKeyBits)
Creates a new
RC2ParameterSpec instance with the specified
effective key length (in bits), |
RC2ParameterSpec(int effectiveKeyBits,
byte[] iv)
Creates a new
RC2ParameterSpec instance with the specified
effective key length (in bits) and initialization vector. |
RC2ParameterSpec(int effectiveKeyBits,
byte[] iv,
int offset)
Creates a new
RC2ParameterSpec instance with the specified
effective key length (in bits) and initialization vector. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares the specified object to this
RC2ParameterSpec
instance. |
int |
getEffectiveKeyBits()
Returns the effective key length (in bits).
|
byte[] |
getIV()
Returns a copy of the initialization vector.
|
int |
hashCode()
Returns the hash code of this
RC2ParameterSpec instance. |
public RC2ParameterSpec(int effectiveKeyBits)
RC2ParameterSpec instance with the specified
effective key length (in bits),effectiveKeyBits - the effective key length (in bits).public RC2ParameterSpec(int effectiveKeyBits,
byte[] iv)
RC2ParameterSpec instance with the specified
effective key length (in bits) and initialization vector.
The size of the initialization vector must be at least 8 bytes which are copied to protect them against modification.
effectiveKeyBits - the effective key length (in bits).iv - the initialization vector.IllegalArgumentException - if the initialization vector is null or shorter than 8 bytes.public RC2ParameterSpec(int effectiveKeyBits,
byte[] iv,
int offset)
RC2ParameterSpec instance with the specified
effective key length (in bits) and initialization vector.
The size of the initialization vector starting at
offset must be at least 8 bytes which are copied to protect
them against modification.
effectiveKeyBits - the effective key length (in bits).iv - the initialization vector.offset - the offset in the initialization vector to start at.IllegalArgumentException - if the initialization vector is null or starting at
offset is shorter than 8 bytes.public int getEffectiveKeyBits()
public byte[] getIV()
public boolean equals(Object obj)
RC2ParameterSpec
instance.equals in class Objectobj - the object to compare.Object.hashCode()public int hashCode()
RC2ParameterSpec instance.hashCode in class ObjectObject.equals(java.lang.Object)