The parameters consist of a version number, a rounds count, a word size, and optionally an initialization vector (IV) (only in feedback mode).
This class can be used to initialize a Cipher
object that
implements the RC5 algorithm as supplied by
RSA Security LLC,
or any parties authorized by RSA Security.
Modifier and Type | Field and Description |
---|---|
private byte[] | |
private final int | |
private final int | |
private final int |
Access | Constructor and Description |
---|---|
public | RC5ParameterSpec(int
the version. version, int the number of rounds. rounds, int the word size in bits. wordSize)Constructs a parameter set for RC5 from the given version, number of rounds and word size (in bits). |
public | RC5ParameterSpec(int
the version. version, int the number of rounds. rounds, int the word size in bits. wordSize, byte[] the buffer with the IV. The first iv)2*(wordSize/8)
bytes of the buffer are copied to protect against subsequent
modification.Constructs a parameter set for RC5 from the given version, number of rounds, word size (in bits), and IV. |
public | RC5ParameterSpec(int
the version. version, int the number of rounds. rounds, int the word size in bits. wordSize, byte[] the buffer with the IV. The first iv, int 2*(wordSize/8)
bytes of the buffer beginning at offset
inclusive are copied to protect against subsequent modification.the offset in offset)iv where the IV starts.Constructs a parameter set for RC5 from the given version, number of rounds, word size (in bits), and IV. |
Modifier and Type | Method and Description |
---|---|
public boolean | Returns: true if the objects are considered equal, false ifobj is null or otherwise.the object to test for equality with this object. obj)Overrides java. Tests for equality between the specified object and this object. |
public byte[] | Returns: the IV or null if this parameter set does not contain an IV. Returns a new array each time this method is called.Returns the IV or null if this parameter set does not contain an IV. |
public int | |
public int | |
public int | |
public int |
iv | back to summary |
---|---|
private byte[] iv |
rounds | back to summary |
---|---|
private final int rounds |
version | back to summary |
---|---|
private final int version |
wordSize | back to summary |
---|---|
private final int wordSize |
RC5ParameterSpec | back to summary |
---|---|
public RC5ParameterSpec(int version, int rounds, int wordSize) Constructs a parameter set for RC5 from the given version, number of rounds and word size (in bits).
|
RC5ParameterSpec | back to summary |
---|---|
public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) Constructs a parameter set for RC5 from the given version, number of rounds, word size (in bits), and IV. Note that the size of the IV (block size) must be twice the word
size. The bytes that constitute the IV are those between
|
RC5ParameterSpec | back to summary |
---|---|
public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv, int offset) Constructs a parameter set for RC5 from the given version, number of rounds, word size (in bits), and IV. The IV is taken from
|
equals | back to summary |
---|---|
public boolean equals(Object obj) Overrides java. Tests for equality between the specified object and this
object. Two RC5ParameterSpec objects are considered equal if their
version numbers, number of rounds, word sizes, and IVs are equal.
(Two IV references are considered equal if both are |
getIV | back to summary |
---|---|
public byte[] getIV() Returns the IV or null if this parameter set does not contain an IV.
|
getRounds | back to summary |
---|---|
public int getRounds() Returns the number of rounds.
|
getVersion | back to summary |
---|---|
public int getVersion() Returns the version.
|
getWordSize | back to summary |
---|---|
public int getWordSize() Returns the word size in bits.
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Calculates a hash code value for the object. Objects that are equal will also have the same hashcode.
|