to top
Android APIs
public class

DHPublicKeySpec

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

Class Overview

The key specification for a Diffie-Hellman public key.

Summary

Public Constructors
DHPublicKeySpec( BigInteger y, BigInteger p, BigInteger g)
Creates a new DHPublicKeySpec instance with the specified public value y, the prime modulus p and the base generator g.
Public Methods
BigInteger getG()
Returns the base generator g;
BigInteger getP()
Returns the prime modulus p.
BigInteger getY()
Returns the public value y.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DHPublicKeySpec (BigInteger y, BigInteger p, BigInteger g)

Added in API level 1

Creates a new DHPublicKeySpec instance with the specified public value y, the prime modulus p and the base generator g.

Parameters
y the public value.
p the prime modulus.
g the base generator.

Public Methods

public BigInteger getG ()

Added in API level 1

Returns the base generator g;

Returns
  • the base generator g;

public BigInteger getP ()

Added in API level 1

Returns the prime modulus p.

Returns
  • the prime modulus p.

public BigInteger getY ()

Added in API level 1

Returns the public value y.

Returns
  • the public value y.
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.