Android APIs
public class

RC5ParameterSpec

extends Object
implements AlgorithmParameterSpec
java.lang.Object
   ↳ javax.crypto.spec.RC5ParameterSpec

Class Overview

The algorithm parameter specification for the RC5 algorithm.

Summary

Public Constructors
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.
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public RC5ParameterSpec (int version, int rounds, int wordSize)

Added in API level 1

Creates a new RC5ParameterSpec instance with the specified version, round count an word size (in bits).

Parameters
version the version.
rounds the round count.
wordSize the word size (in bits).

public RC5ParameterSpec (int version, int rounds, int wordSize, byte[] iv)

Added in API level 1

Creates a new 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.

Parameters
version the version.
rounds the round count.
wordSize the word size (in bits).
iv the initialization vector.
Throws
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)

Added in API level 1

Creates a new 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.

Parameters
version the version.
rounds the round count.
wordSize the word size (in bits).
iv the initialization vector.
offset the offset in the initialization vector.
Throws
IllegalArgumentException if the initialization vector is null of shorter than offset + (2 * (wordSize / 8)).
ArrayIndexOutOfBoundsException if offset is negative.

Public Methods

public boolean equals (Object obj)

Added in API level 1

Compares the specified object with this RC5ParameterSpec instance.

Parameters
obj the object to compare.
Returns
  • true if version, round count, word size and initializaion vector of both objects are equal, otherwise false.

public byte[] getIV ()

Added in API level 1

Returns a copy of the initialization vector.

Returns
  • a copy of the initialization vector, or null if none specified.

public int getRounds ()

Added in API level 1

Returns the round count.

Returns
  • the round count.

public int getVersion ()

Added in API level 1

Returns the version.

Returns
  • the version.

public int getWordSize ()

Added in API level 1

Returns the word size (in bits).

Returns
  • the word size (in bits).

public int hashCode ()

Added in API level 1

Returns the hash code of this RC5ParameterSpec instance.

Returns
  • the hash code.