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

## org.bouncycastle.crypto.generators
Class DSAParametersGenerator

    java.lang.Object
      org.bouncycastle.crypto.generators.DSAParametersGenerator

public class DSAParametersGenerator
extends java.lang.Object

Generate suitable parameters for DSA, in line with FIPS 186-2, or FIPS 186-3.

Constructor Summary
`DSAParametersGenerator()`
`DSAParametersGenerator(Digest digest)`

Method Summary
`DSAParameters` | `generateParameters()` which generates the p and g values from the given parameters, returning the DSAParameters object.
`void` | `init(DSAParameterGenerationParameters params)` Initialise the key generator for DSA 2.
`void` | `init(int size, int certainty, java.security.SecureRandom random)` initialise the key generator.

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

Constructor Detail

### DSAParametersGenerator

    public DSAParametersGenerator()

### DSAParametersGenerator

    public DSAParametersGenerator(Digest digest)

Method Detail

### init

    public void init(int size,
                     int certainty,
                     java.security.SecureRandom random)

  initialise the key generator.

  Parameters:
    `size` - size of the key (range 2^512 -> 2^1024 - 64 bit increments)
    `certainty` - measure of robustness of prime (for FIPS 186-2 compliance this should be at least 80).
    `random` - random byte source.

### init

    public void init(DSAParameterGenerationParameters params)

  Initialise the key generator for DSA 2.

  Use this init method if you need to generate parameters for DSA 2 keys.

  Parameters:
    `params` - DSA 2 key generation parameters.

### generateParameters

    public DSAParameters generateParameters()

  which generates the p and g values from the given parameters, returning the DSAParameters object.

  Note: can take a while[]

  Returns:
    a generated DSA parameters object.

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