Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.crypto.fips.provider
Class DHPublicKey

    java.lang.Object
      |
      +--com.ibm.crypto.fips.provider.DHPublicKey

All Implemented Interfaces:
  javax.crypto.interfaces.DHKey, javax.crypto.interfaces.DHPublicKey, java.security.Key, java.security.PublicKey, java.io.Serializable

public final class DHPublicKey
extends java.lang.Object
implements java.security.PublicKey, javax.crypto.interfaces.DHPublicKey, java.io.Serializable

A public key in X.509 format for the Diffie-Hellman key agreement algorithm.

Version:
  1.0, 05/19/03
Author:
  Jan Luehe, John Peck
See Also:
  `DHPrivateKey`, `java.security.KeyAgreement`, Serialized Form

Fields inherited from interface java.security.PublicKey
`serialVersionUID`

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`protected void` | `finalize()` This function zeroizes the key so that it isn't in memory when GC is done.
`java.lang.String` | `getAlgorithm()` Returns the name of the algorithm associated with this key: "DH"
`byte[]` | `getEncoded()` Get the encoding of the key.
`java.lang.String` | `getFormat()` Returns the encoding format of this key: "X.509"
`javax.crypto.spec.DHParameterSpec` | `getParams()` Returns the key parameters.
`java.math.BigInteger` | `getY()` Returns the public value, `y`.
`int` | `hashCode()` Calculates a hash code value for the object.
`java.lang.String` | `toString()`
`void` | `zeroize()` This function zeroizes the key so that it isn't in memory

Methods inherited from class java.lang.Object
`clone, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### getFormat

    public java.lang.String getFormat()

  Returns the encoding format of this key: "X.509"
  Specified by:
    `getFormat` in interface `java.security.Key`

### getAlgorithm

    public java.lang.String getAlgorithm()

  Returns the name of the algorithm associated with this key: "DH"
  Specified by:
    `getAlgorithm` in interface `java.security.Key`

### getEncoded

    public byte[] getEncoded()

  Get the encoding of the key.
  Specified by:
    `getEncoded` in interface `java.security.Key`

### getY

    public java.math.BigInteger getY()

  Returns the public value, `y`.
  Specified by:
    `getY` in interface `javax.crypto.interfaces.DHPublicKey`
  Returns:
    the public value, `y`

### getParams

    public javax.crypto.spec.DHParameterSpec getParams()

  Returns the key parameters.
  Specified by:
    `getParams` in interface `javax.crypto.interfaces.DHKey`
  Returns:
    the key parameters

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Calculates a hash code value for the object. Objects that are equal will also have the same hashcode.
  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### zeroize

    public void zeroize()

  This function zeroizes the key so that it isn't in memory

### finalize

    protected void finalize()

  This function zeroizes the key so that it isn't in memory when GC is done.
  Overrides:
    `finalize` in class `java.lang.Object`

Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD