| Modifier and Type | Field and Description |
|---|---|
static int |
DES_EDE_KEY_LEN
定义DESede密钥长度的常数(以字节为单位)。
|
| Constructor and Description |
|---|
DESedeKeySpec(byte[] key)
创建使用前24个字节在一个DESedeKeySpec对象,
key作为DES-EDE密钥的密钥材料。
|
DESedeKeySpec(byte[] key, int offset)
创建使用前24个字节在一个DESedeKeySpec对象,
key ,在开始
offset以下,作为DES-EDE密钥的密钥材料。
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getKey()
返回DES-EDE键。
|
static boolean |
isParityAdjusted(byte[] key, int offset)
检查给定的DES-EDE密钥是否从
offset开始进行奇偶校验。
|
public static final int DES_EDE_KEY_LEN
public DESedeKeySpec(byte[] key)
throws InvalidKeyException
key作为DES-EDE密钥的密钥材料。
构成DES-EDE键的字节是key[0]和key[23]之间的字节
key - 具有DES-EDE密钥资料的缓冲区。
缓冲区的前24个字节被复制以防止后续修改。
NullPointerException - 如果
key为空。
InvalidKeyException - 如果给定的密钥材料短于24个字节。
public DESedeKeySpec(byte[] key,
int offset)
throws InvalidKeyException
key ,在开始offset以下,作为DES-EDE密钥的密钥材料。
组成DES-EDE密钥的字节在之间key[offset]和key[offset+23]以下。
key - 具有DES-EDE密钥资料的缓冲区。
从offset( offset开始的缓冲区的前24个字节被复制以防止后续修改。
offset - 偏移在
key ,其中DES-EDE密钥材料启动。
NullPointerException - 如果
key为null。
InvalidKeyException - 如果给定的密钥材料(从
offset开始)短于24字节
public byte[] getKey()
public static boolean isParityAdjusted(byte[] key,
int offset)
throws InvalidKeyException
offset开始进行奇偶校验。
key - 保存键值的字节数组
offset - 字节数组的偏移量
NullPointerException - 如果
key为空。
InvalidKeyException - 如果给定的密钥材料(从
offset开始包含)短于24字节
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.