Skip to content

Most visited

Recently visited

navigation
Added in API level 1

RC5ParameterSpec

public class RC5ParameterSpec
extends Object implements AlgorithmParameterSpec

java.lang.Object
   ↳ javax.crypto.spec.RC5ParameterSpec


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.

Inherited methods

From class java.lang.Object

Public constructors

RC5ParameterSpec

Added in API level 1
RC5ParameterSpec (int version, 
                int rounds, 
                int wordSize)

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

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

RC5ParameterSpec

Added in API level 1
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.

The size of the initialization vector must be at least 2 * (wordSize / 8) bytes which are copied to protect them against modification.

Parameters
version int: the version.
rounds int: the round count.
wordSize int: the word size (in bits).
iv byte: the initialization vector.
Throws
IllegalArgumentException if the initialization vector is null or shorter than 2 * (wordSize / 8).

RC5ParameterSpec

Added in API level 1
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.

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

equals

Added in API level 1
boolean equals (Object obj)

Compares the specified object with this RC5ParameterSpec instance.

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

getIV

Added in API level 1
byte[] getIV ()

Returns a copy of the initialization vector.

Returns
byte[] a copy of the initialization vector, or null if none specified.

getRounds

Added in API level 1
int getRounds ()

Returns the round count.

Returns
int the round count.

getVersion

Added in API level 1
int getVersion ()

Returns the version.

Returns
int the version.

getWordSize

Added in API level 1
int getWordSize ()

Returns the word size (in bits).

Returns
int the word size (in bits).

hashCode

Added in API level 1
int hashCode ()

Returns the hash code of this RC5ParameterSpec instance.

Returns
int the hash code.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.