Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.crypto;
The base class for symmetric, or secret, cipher key generators.
 public class CipherKeyGenerator
    protected SecureRandom  random;
    protected int           strength;

initialise the key generator.

param the parameters to be used for key generation
    public void init(
        KeyGenerationParameters param)
        this. = param.getRandom();
        this. = (param.getStrength() + 7) / 8;

generate a secret key.

a byte array containing the key value.
    public byte[] generateKey()
        byte[]  key = new byte[];
        return key;
New to GrepCode? Check out our FAQ X