public static boolean isWeak (byte[] key, int offset) throws InvalidKeyException

Checks if the given DES key material is weak or semi-weak.

Parameters:
key    the buffer with the DES key material.
offset    the offset in key, where the DES key material starts.

Returns:  true if the given DES key material is weak or semi-weak, false otherwise.

Exceptions:
InvalidKeyException    if the given key material is null, or starting at offset inclusive, is shorter than 8 bytes.