Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.26
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.crypto.params
Class DESParameters

    java.lang.Object
      |
      +--org.bouncycastle.crypto.params.KeyParameter
            |
            +--org.bouncycastle.crypto.params.DESParameters

All Implemented Interfaces:
  CipherParameters

Direct Known Subclasses:
  DESedeParameters

public class DESParameters
extends KeyParameter

Field Summary
`static int` | `DES_KEY_LENGTH`

Constructor Summary
`DESParameters(byte[] key)`

Method Summary
`static boolean` | `isWeakKey(byte[] key, int offset)` DES has 16 weak keys.
`static void` | `setOddParity(byte[] bytes)` DES Keys use the LSB as the odd parity bit.

Methods inherited from class org.bouncycastle.crypto.params.KeyParameter
`getKey`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DES_KEY_LENGTH

    public static final int DES_KEY_LENGTH

Constructor Detail

### DESParameters

    public DESParameters(byte[] key)

Method Detail

### isWeakKey

    public static boolean isWeakKey(byte[] key,
                                    int offset)

  DES has 16 weak keys. This method will check if the given DES key material is weak or semi-weak. Key material that is too short is regarded as weak.

  See "Applied Cryptography" by Bruce Schneier for more information.

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

### setOddParity

    public static void setOddParity(byte[] bytes)

  DES Keys use the LSB as the odd parity bit. This can be used to check for corrupt keys.
  Parameters:
    `bytes` - the byte array to set the parity on.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.26
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD