public class RC5ParameterSpec extends Object implements AlgorithmParameterSpec
这些参数包括版本号,回合计数,字大小和可选的初始化向量(IV)(仅在反馈模式中)。
该类可用于初始化Cipher实现由RSA Security Inc.或由RSA Security授权的任何方提供的RC5 Cipher对象。
| Constructor and Description |
|---|
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的参数集。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
测试指定对象和此对象之间的相等性。
|
byte[] |
getIV()
如果此参数集不包含IV,则返回IV或null。
|
int |
getRounds()
返回轮数。
|
int |
getVersion()
返回版本。
|
int |
getWordSize()
以位为单位返回字大小。
|
int |
hashCode()
计算对象的哈希码值。
|
public RC5ParameterSpec(int version,
int rounds,
int wordSize)
version - 版本。
rounds - 回合数。
wordSize - 字大小(以位为单位)。
public RC5ParameterSpec(int version,
int rounds,
int wordSize,
byte[] iv)
请注意,IV(块大小)的大小必须是字大小的两倍。 组成IV的字节在之间iv[0]和iv[2*(wordSize/8)-1]以下。
version - 版本。
rounds - 回合数。
wordSize - 字大小(以位为单位)。
iv - 具有IV的缓冲区。
缓冲区的第一个2*(wordSize/8)字节被复制以防止后续修改。
IllegalArgumentException - 如果
iv是
null或
(iv.length < 2 * (wordSize / 8))
public RC5ParameterSpec(int version,
int rounds,
int wordSize,
byte[] iv,
int offset)
所述IV取自iv ,起始于offset以下。 请注意,从offset包括起始)开始的IV(块大小)的大小必须是字大小的两倍。 组成IV的字节在之间iv[offset]和iv[offset+2*(wordSize/8)-1]以下。
version - 版本。
rounds - 回合数。
wordSize - 字大小(以位为单位)。
iv - 具有IV的缓冲区。
第一2*(wordSize/8)字节在开始缓冲的offset包容被复制到防止后续修改。
offset - 偏差在
iv哪里IV开始。
IllegalArgumentException - 如果
iv是
null或
(iv.length - offset < 2 * (wordSize / 8))
public int getVersion()
public int getRounds()
public int getWordSize()
public byte[] getIV()
public boolean equals(Object obj)
equals在类
Object
obj - 测试与此对象相等的对象。
obj为
obj为空。
Object.hashCode() , HashMap
public int hashCode()
hashCode在类别
Object
Object.equals(java.lang.Object) ,
System.identityHashCode(java.lang.Object)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.