| Modifier and Type | Field and Description |
|---|---|
static int |
DES_EDE_KEY_LEN
The length of a DES-EDE key in bytes.
|
| Constructor and Description |
|---|
DESedeKeySpec(byte[] key)
Creates a new
DESedeKeySpec instance from the first 24 (
DES_EDE_KEY_LEN) bytes of the specified key data. |
DESedeKeySpec(byte[] key,
int offset)
Creates a new
DESedeKeySpec instance from the first 24 (
DES_EDE_KEY_LEN ) bytes of the specified key data starting at
offset. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getKey()
Returns a copy of the key.
|
static boolean |
isParityAdjusted(byte[] key,
int offset)
Returns whether the specified key data starting at
offset is
parity-adjusted. |
public static final int DES_EDE_KEY_LEN
public DESedeKeySpec(byte[] key)
throws InvalidKeyException
DESedeKeySpec instance from the first 24 (
DES_EDE_KEY_LEN) bytes of the specified key data.key - the key data.InvalidKeyException - if the length of the key data is less than 24.NullPointerException - if the key data is null.public DESedeKeySpec(byte[] key,
int offset)
throws InvalidKeyException
DESedeKeySpec instance from the first 24 (
DES_EDE_KEY_LEN ) bytes of the specified key data starting at
offset.key - the key dataoffset - the offset to start at.InvalidKeyException - if the length of the key data starting at offset is less than
24.NullPointerException - if the key data is null.public byte[] getKey()
public static boolean isParityAdjusted(byte[] key,
int offset)
throws InvalidKeyException
offset is
parity-adjusted.key - the key data.offset - the offset to start checking at.true if the specified key data is parity-adjusted,
false otherwise.InvalidKeyException - if the length of the key data starting at offset is less than
24.