to top
Android APIs
public class

DHPrivateKeySpec

extends Object
implements KeySpec
java.lang.Object
   ↳ javax.crypto.spec.DHPrivateKeySpec

Class Overview

The key specification for a Diffie-Hellman private key.

Summary

Public Constructors
DHPrivateKeySpec(BigInteger x, BigInteger p, BigInteger g)
Creates a new DHPrivateKeySpec with the specified private value x.
Public Methods
BigInteger getG()
Returns the base generator g.
BigInteger getP()
Returns the prime modulus p.
BigInteger getX()
Returns the private value x.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DHPrivateKeySpec (BigInteger x, BigInteger p, BigInteger g)

Since: API Level 1

Creates a new DHPrivateKeySpec with the specified private value x. prime modulus p and base generator g.

Parameters
x the private value.
p the prime modulus.
g the base generator.

Public Methods

public BigInteger getG ()

Since: API Level 1

Returns the base generator g.

Returns
  • the base generator g.

public BigInteger getP ()

Since: API Level 1

Returns the prime modulus p.

Returns
  • the prime modulus p.

public BigInteger getX ()

Since: API Level 1

Returns the private value x.

Returns
  • the private value x.