public class RC5ParameterSpec extends Object implements AlgorithmParameterSpec
Constructor and Description |
---|
RC5ParameterSpec(int version,
int rounds,
int wordSize)
Creates a new
RC5ParameterSpec instance with the specified
version, round count an word size (in bits). |
RC5ParameterSpec(int version,
int rounds,
int wordSize,
byte[] iv)
Creates a new
RC5ParameterSpec instance with the specified
version, round count, word size (in bits) and an initialization
vector. |
RC5ParameterSpec(int version,
int rounds,
int wordSize,
byte[] iv,
int offset)
Creates a new
RC5ParameterSpec instance with the specified
version, round count, wordSize (in bits), an initialization vector
and an offset. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares the specified object with this
RC5ParameterSpec
instance. |
byte[] |
getIV()
Returns a copy of the initialization vector.
|
int |
getRounds()
Returns the round count.
|
int |
getVersion()
Returns the version.
|
int |
getWordSize()
Returns the word size (in bits).
|
int |
hashCode()
Returns the hash code of this
RC5ParameterSpec instance. |
public RC5ParameterSpec(int version, int rounds, int wordSize)
RC5ParameterSpec
instance with the specified
version, round count an word size (in bits).version
- the version.rounds
- the round count.wordSize
- the word size (in bits).public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv)
RC5ParameterSpec
instance with the specified
version, round count, word size (in bits) and an initialization
vector.
The size of the initialization vector must be at least
2 * (wordSize / 8)
bytes which are copied to protect them
against modification.
version
- the version.rounds
- the round count.wordSize
- the word size (in bits).iv
- the initialization vector.IllegalArgumentException
- if the initialization vector is null or shorter than 2
* (wordSize / 8)
.public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv, int offset)
RC5ParameterSpec
instance with the specified
version, round count, wordSize (in bits), an initialization vector
and an offset.
The size of the initialization vector must be at least
offset + (2 * (wordSize / 8))
bytes. The bytes starting at
offset
are copied to protect them against modification.
version
- the version.rounds
- the round count.wordSize
- the word size (in bits).iv
- the initialization vector.offset
- the offset in the initialization vector.IllegalArgumentException
- if the initialization vector is null of shorter than
offset + (2 * (wordSize / 8))
.ArrayIndexOutOfBoundsException
- if offset
is negative.public int getVersion()
public int getRounds()
public int getWordSize()
public byte[] getIV()
public boolean equals(Object obj)
RC5ParameterSpec
instance.equals
in class Object
obj
- the object to compare.Object.hashCode()
public int hashCode()
RC5ParameterSpec
instance.hashCode
in class Object
Object.equals(java.lang.Object)