|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.crypto.spec.RC5ParameterSpec
public class RC5ParameterSpec
此類別指定隨同 RC5 演算法使用的參數。
參數由一個版本號、一個 round 計數、一個 word 大小以及一個任意初始化向量 (IV)(僅用於反饋網要)組成。
可以使用此類別來初始化一個實作了 RSA Security Inc. 或 RSA Security 授權的任何參與方所提供的 RC5 演算法的 Cipher 物件。
| 建構子摘要 | |
|---|---|
RC5ParameterSpec(int version,
int rounds,
int wordSize)
根據給定的版本、round 的數量以及 word 大小(以位為單位)為 RC5 建構一個參數集合。 |
|
RC5ParameterSpec(int version,
int rounds,
int wordSize,
byte[] iv)
根據給定的版本、round 的數量、word 大小(以位為單位)以及 IV 為 RC5 建構一個參數集合。 |
|
RC5ParameterSpec(int version,
int rounds,
int wordSize,
byte[] iv,
int offset)
根據給定的版本、round 的數量、word 大小(以位為單位)以及 IV 為 RC5 建構一個參數集合。 |
|
| 方法摘要 | |
|---|---|
boolean |
equals(Object obj)
測試給定對象與此物件的相等性。 |
byte[] |
getIV()
返回 IV,如果此參數集沒有包含 IV 則返回 null。 |
int |
getRounds()
返回 rounds 的數量。 |
int |
getVersion()
返回版本。 |
int |
getWordSize()
返回以位為單位的 word 大小。 |
int |
hashCode()
計算此物件的雜湊碼值。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public RC5ParameterSpec(int version,
int rounds,
int wordSize)
version - 版本。rounds - rounds 的數量。wordSize - 以位為單位的 word 大小。
public RC5ParameterSpec(int version,
int rounds,
int wordSize,
byte[] iv)
注意,IV 的大小(塊大小)必須是 word 大小的兩倍。組成 IV 的位元組在 iv[0] 和 iv[2*(wordSize/8)-1]] 範圍內(包含兩者)。
version - 版本。rounds - rounds 的數量。wordSize - 以位為單位的 word 大小。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 的大小(塊大小)必須是 word 大小的兩倍。組成 IV 的位元組在 iv[offset] 和 iv[offset+2*(wordSize/8)-1] 範圍內(包含兩者)。
version - 版本。rounds - rounds 的數量。wordSize - 以位為單位的 word 大小。iv - 具有 IV 的緩衝區。複製該緩衝區的始於且包含 offset 的前 2*(wordSize/8) 個位元組來防止後續修改。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)
Object 中的 equalsobj - 要與此物件進行相等性測試的物件。
obj 為 null 或其他情況則返回 false。Object.hashCode(),
Hashtablepublic int hashCode()
Object 中的 hashCodeObject.equals(java.lang.Object),
Hashtable
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。