Most visited

Recently visited

Added in API level 1

RC5ParameterSpec

public class RC5ParameterSpec
extends Object implements AlgorithmParameterSpec

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


该类指定与 RC5算法一起使用的参数。

参数由版本号,循环计数,字大小和可选的初始化矢量(IV)组成(仅在反馈模式下)。

该类可用于初始化 Cipher对象,该对象实现 RSA Security Inc.提供的 RC5算法或由RSA Security授权的任何方。

摘要(Summary)

Public constructors

RC5ParameterSpec(int version, int rounds, int wordSize)

根据给定版本,循环次数和字大小(以位为单位)为RC5构造一个参数集。

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

根据给定版本,循环次数,字大小(以位为单位)和IV构造RC5的参数集。

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

根据给定版本,循环次数,字大小(以位为单位)和IV构造RC5的参数集。

公共方法(Public methods)

boolean equals(Object obj)

测试指定对象和此对象之间的相等性。

byte[] getIV()

如果此参数集不包含IV,则返回IV或null。

int getRounds()

返回轮次数。

int getVersion()

返回版本。

int getWordSize()

以位为单位返回字大小。

int hashCode()

计算该对象的哈希码值。

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

RC5ParameterSpec

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

根据给定版本,循环次数和字大小(以位为单位)为RC5构造一个参数集。

参数(Parameters)
version int: the version.
rounds int: the number of rounds.
wordSize int: the word size in bits.

RC5ParameterSpec

Added in API level 1
RC5ParameterSpec (int version, 
                int rounds, 
                int wordSize, 
                byte[] iv)

根据给定版本,循环次数,字大小(以位为单位)和IV构造RC5的参数集。

请注意,IV(块大小)的大小必须是字大小的两倍。 构成IV的字节是iv[0]iv[2*(wordSize/8)-1]之间的那些字节。

参数(Parameters)
version int: the version.
rounds int: the number of rounds.
wordSize int: the word size in bits.
iv byte: the buffer with the IV. The first 2*(wordSize/8) bytes of the buffer are copied to protect against subsequent modification.
抛出异常(Throws)
IllegalArgumentException if iv is null or (iv.length < 2 * (wordSize / 8))

RC5ParameterSpec

Added in API level 1
RC5ParameterSpec (int version, 
                int rounds, 
                int wordSize, 
                byte[] iv, 
                int offset)

根据给定版本,循环次数,字大小(以位为单位)和IV构造RC5的参数集。

IV取自iv ,起始于offset含)。 请注意,IV(块大小)的大小(从offset开始)必须是字大小的两倍。 构成IV的字节是iv[offset]iv[offset+2*(wordSize/8)-1]之间的那些字节。

参数(Parameters)
version int: the version.
rounds int: the number of rounds.
wordSize int: the word size in bits.
iv byte: the buffer with the IV. The first 2*(wordSize/8) bytes of the buffer beginning at offset inclusive are copied to protect against subsequent modification.
offset int: the offset in iv where the IV starts.
抛出异常(Throws)
IllegalArgumentException if iv is null or (iv.length - offset < 2 * (wordSize / 8))

公共方法(Public methods)

equals

Added in API level 1
boolean equals (Object obj)

测试指定对象和此对象之间的相等性。 如果两个RC5ParameterSpec对象的版本号,循环次数,字大小和IV相等,则认为它们是相等的。 (如果二者都是null,则两个IV参考被认为是相等的。)

参数(Parameters)
obj Object: the object to test for equality with this object.
返回(Returns)
boolean true if the objects are considered equal, false if obj is null or otherwise.

getIV

Added in API level 1
byte[] getIV ()

如果此参数集不包含IV,则返回IV或null。

返回(Returns)
byte[] the IV or null if this parameter set does not contain an IV. Returns a new array each time this method is called.

getRounds

Added in API level 1
int getRounds ()

返回轮次数。

返回(Returns)
int the number of rounds.

getVersion

Added in API level 1
int getVersion ()

返回版本。

返回(Returns)
int the version.

getWordSize

Added in API level 1
int getWordSize ()

以位为单位返回字大小。

返回(Returns)
int the word size in bits.

hashCode

Added in API level 1
int hashCode ()

计算该对象的哈希码值。 相等的对象也将具有相同的哈希码。

返回(Returns)
int a hash code value for this object.

Hooray!