DESedeParameterspublic class DESedeParameters extends DESParameters
Fields Summary |
---|
public static final int | DES_EDE_KEY_LENGTH |
Constructors Summary |
---|
public DESedeParameters(byte[] key)
super(key);
if (isWeakKey(key, 0, 0))
{
throw new IllegalArgumentException("attempt to create weak DESede key");
}
|
Methods Summary |
---|
public static boolean | isWeakKey(byte[] key, int offset, int length)return true if the passed in key is a DES-EDE weak key.
for (int i = offset; i < length; i += DES_KEY_LENGTH)
{
if (DESParameters.isWeakKey(key, i))
{
return true;
}
}
return false;
| public static boolean | isWeakKey(byte[] key, int offset)return true if the passed in key is a DES-EDE weak key.
return isWeakKey(key, offset, key.length - offset);
|
|