Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.core
Class DHKeyPairGenerator

`java.lang.Object
oracle.security.crypto.core.KeyPairGenerator
oracle.security.crypto.core.DHKeyPairGenerator`

public final class DHKeyPairGenerator
extends KeyPairGenerator

*** For internal use only *** Generates private/public keypairs, using the given domain parameters and `RandomBitsSource`, as specified in X9.42.

Status: Provisional (may be changed in future releases.)

See Also:
  `DHParams`, `DHPublicKey`, `DHPrivateKey`, `DHKeyAgreement`

Field Summary

Fields inherited from class oracle.security.crypto.core.KeyPairGenerator
`rbs`

Constructor Summary
`DHKeyPairGenerator()` Constructs a new, uninitialized instance of `DHKeyPairGenerator`.

Method Summary
`KeyPair` | `generateKeyPair()` Generates a public/private key pair.
`java.lang.String` | `getAlgorithm()` Simply returns the string "Diffie-Hellman" (provided for compatibility with the contract of the abstract class `KeyPairGenerator`.)
`void` | `initialize(DHParams params, RandomBitsSource rbs)` Initializes the key pair generator with the given parameters and source of randomness.
`void` | `initialize(int L, int m, RandomBitsSource rbs)` Initializes the key pair generator with the given source of randomness.
`void` | `initialize(int L, RandomBitsSource rbs)` Initializes the key pair generator with the given source of randomness.
`void` | `setAlgID(AlgorithmIdentifier algID)` Assigns the given `AlgorithmIdentifier` to the generator; you would only want to do this use this method as a convience, if your identifier contains a set of domain parameters (for which the call would essentially be equivalent to `initialize(params)`.)

Methods inherited from class oracle.security.crypto.core.KeyPairGenerator
`getInstance, getInstance, setRandomBitsSource`

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

Constructor Detail

### DHKeyPairGenerator

    public DHKeyPairGenerator()

  Constructs a new, uninitialized instance of `DHKeyPairGenerator`.

Method Detail

### initialize

    public void initialize(DHParams params,
                           RandomBitsSource rbs)

  Initializes the key pair generator with the given parameters and source of randomness.
  Parameters:
    `params` - The `DHParams` object to be used to generate key pair
    `rbs` - A secure random bits source.

### initialize

    public void initialize(int L,
                           int m,
                           RandomBitsSource rbs)

  Initializes the key pair generator with the given source of randomness. New domain parameters of the specified size is generated.
  Parameters:
    `L` - The size in bits for p
    `m` - The size in bits for q
    `rbs` - A secure random bits source.

### initialize

    public void initialize(int L,
                           RandomBitsSource rbs)

  Initializes the key pair generator with the given source of randomness. New domain parameters of the specified size for p and 160-bits q is generated.
  Specified by:
    `initialize` in class `KeyPairGenerator`
  Parameters:
    `L` - The size in bits for p
    `rbs` - A secure random bits source.

### getAlgorithm

    public java.lang.String getAlgorithm()

  Simply returns the string "Diffie-Hellman" (provided for compatibility with the contract of the abstract class `KeyPairGenerator`.)
  Specified by:
    `getAlgorithm` in class `KeyPairGenerator`
  Returns:
    "Diffie-Hellman"

### setAlgID

    public void setAlgID(AlgorithmIdentifier algID)
                  throws AlgorithmIdentifierException

  Assigns the given `AlgorithmIdentifier` to the generator; you would only want to do this use this method as a convience, if your identifier contains a set of domain parameters (for which the call would essentially be equivalent to `initialize(params)`.)
  Specified by:
    `setAlgID` in class `KeyPairGenerator`
  Throws:
    `AlgorithmIdentifierException`

### generateKeyPair

    public KeyPair generateKeyPair()

  Description copied from class: `KeyPairGenerator`
  Generates a public/private key pair.
  Specified by:
    `generateKeyPair` in class `KeyPairGenerator`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.