| Modifier and Type | Field and Description |
|---|---|
| public static final int | DES_KEY_LEN
The constant which defines the length of a DES key in bytes. |
| private final byte[] | |
| private static final byte[][] |
| Access | Constructor and Description |
|---|---|
| public | DESKeySpec(byte[]
the buffer with the DES key material. The first 8 bytes
of the buffer are copied to protect against subsequent modification. key)Creates a DESKeySpec object using the first 8 bytes in
|
| public | DESKeySpec(byte[]
the buffer with the DES key material. The first 8 bytes
of the buffer beginning at key, int offset inclusive are copied
to protect against subsequent modification.the offset in offset)key, where the DES key
material starts.Creates a DESKeySpec object using the first 8 bytes in
|
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | Returns: the DES key material. Returns a new array each time this method is called.Returns the DES key material. |
| public static boolean | Returns: true if the given DES key material is parity-adjusted, false otherwise.the buffer with the DES key material. key, int the offset in offset)key, where the DES key
material starts.Checks if the given DES key material, starting at |
| public static boolean | Returns: true if the given DES key material is weak or semi-weak, false otherwise.the buffer with the DES key material. key, int the offset in offset)key, where the DES key
material starts.Checks if the given DES key material is weak or semi-weak. |
| DES_KEY_LEN | back to summary |
|---|---|
| public static final int DES_KEY_LEN The constant which defines the length of a DES key in bytes. | |
| key | back to summary |
|---|---|
| private final byte[] key | |
| WEAK_KEYS | back to summary |
|---|---|
| private static final byte[][] WEAK_KEYS | |
| DESKeySpec | back to summary |
|---|---|
| public DESKeySpec(byte[] key) throws InvalidKeyException Creates a DESKeySpec object using the first 8 bytes in
The bytes that constitute the DES key are those between
| |
| DESKeySpec | back to summary |
|---|---|
| public DESKeySpec(byte[] key, int offset) throws InvalidKeyException Creates a DESKeySpec object using the first 8 bytes in
The bytes that constitute the DES key are those between
| |
| getKey | back to summary |
|---|---|
| public byte[] getKey() Returns the DES key material.
| |
| isParityAdjusted | back to summary |
|---|---|
| public static boolean isParityAdjusted(byte[] key, int offset) throws InvalidKeyException Checks if the given DES key material, starting at
| |
| isWeak | back to summary |
|---|---|
| public static boolean isWeak(byte[] key, int offset) throws InvalidKeyException Checks if the given DES key material is weak or semi-weak.
| |