FileDocCategorySizeDatePackage
DESKeyGenerator.javaAPI DocAzureus 3.0.3.4518Tue Jun 08 05:12:58 BST 2004org.bouncycastle.crypto.generators

DESKeyGenerator

public class DESKeyGenerator extends org.bouncycastle.crypto.CipherKeyGenerator

Fields Summary
Constructors Summary
Methods Summary
public byte[]generateKey()

        byte[]  newKey = new byte[DESParameters.DES_KEY_LENGTH];

        do
        {
            random.nextBytes(newKey);

            DESParameters.setOddParity(newKey);
        }
        while (DESParameters.isWeakKey(newKey, 0));

        return newKey;