public final class DESKey extends SymmetricKey
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkParity(SymmetricKey key, int parity)
Check the least significant bit of each key byte for the parity indicated --
1 for odd parity or 0 for even parity. |
static boolean |
isPossiblyWeak(SymmetricKey key)
Determines whether or not a given DES key is considered "possibly weak".
|
static boolean |
isSemiWeak(SymmetricKey key)
Determines whether or not a given DES key is considered "semi-weak".
|
static boolean |
isWeak(SymmetricKey key)
Determines whether or not a given DES key is considered "weak".
|
static void |
setParity(SymmetricKey key, int parity)
Set the least significant bit of each key byte so that it has the parity indicated --
1 for odd parity or 0 for even parity. |
assertAllowExport, clone, equals, erase, finalize, getAlgID, getAlgorithm, getAllowExport, getBitLength, getBytes, getEncoded, getFormat, keySize, readExternal, setAlgID, setAllowExport, setBytes, toString, writeExternalpublic static boolean isWeak(SymmetricKey key)
public static boolean isSemiWeak(SymmetricKey key)
public static boolean isPossiblyWeak(SymmetricKey key)
public static boolean checkParity(SymmetricKey key, int parity)
1 for odd parity or 0 for even parity.key - The DES key to check.parity - 1 for odd parity or 0 for even parity.true if each byte has the specified parity, otherwise false.public static void setParity(SymmetricKey key, int parity)
1 for odd parity or 0 for even parity.key - The DES key whose parity is to be set.parity - 1 for odd parity or 0 for even parity.