Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.jce.provider.dh
Class DHPublicKeyCryptix  view DHPublicKeyCryptix download DHPublicKeyCryptix.java

java.lang.Object
  extended bycryptix.jce.provider.dh.DHPublicKeyCryptix
All Implemented Interfaces:
javax.crypto.interfaces.DHKey, javax.crypto.interfaces.DHPublicKey, java.security.Key, java.security.PublicKey, java.io.Serializable

final class DHPublicKeyCryptix
extends java.lang.Object
implements javax.crypto.interfaces.DHPublicKey

Immutable Diffie-Hellman public key that can save itself in Cryptix encoding.

Version:
$Revision: 1.1 $

Field Summary
private  javax.crypto.spec.DHParameterSpec params
           
private  java.math.BigInteger y
           
 
Fields inherited from interface javax.crypto.interfaces.DHPublicKey
serialVersionUID
 
Constructor Summary
(package private) DHPublicKeyCryptix(java.math.BigInteger y, javax.crypto.spec.DHParameterSpec params)
           
 
Method Summary
 java.lang.String getAlgorithm()
          This method returns the name of the algorithm for this key.
 byte[] getEncoded()
          This method returns the encoded form of the key.
 java.lang.String getFormat()
          This method returns the name of the encoding format for this key.
 javax.crypto.spec.DHParameterSpec getParams()
          Returns the Diffie-Hellman parameters for this key, which includes the generator and the prime.
 java.math.BigInteger getY()
          Get the public value y.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

y

private final java.math.BigInteger y

params

private final javax.crypto.spec.DHParameterSpec params
Constructor Detail

DHPublicKeyCryptix

DHPublicKeyCryptix(java.math.BigInteger y,
                   javax.crypto.spec.DHParameterSpec params)
Method Detail

getY

public java.math.BigInteger getY()
Description copied from interface: javax.crypto.interfaces.DHPublicKey
Get the public value y.

Specified by:
getY in interface javax.crypto.interfaces.DHPublicKey

getParams

public javax.crypto.spec.DHParameterSpec getParams()
Description copied from interface: javax.crypto.interfaces.DHKey
Returns the Diffie-Hellman parameters for this key, which includes the generator and the prime.

Specified by:
getParams in interface javax.crypto.interfaces.DHKey

getAlgorithm

public java.lang.String getAlgorithm()
Description copied from interface: java.security.Key
This method returns the name of the algorithm for this key. This is a String such as "RSA".

Specified by:
getAlgorithm in interface java.security.Key

getFormat

public java.lang.String getFormat()
Description copied from interface: java.security.Key
This method returns the name of the encoding format for this key. This is the name of the ASN.1 data format used for this key, such as "X.509" or "PKCS#8". This method returns null if this key does not have an encoding format.

Specified by:
getFormat in interface java.security.Key

getEncoded

public byte[] getEncoded()
Description copied from interface: java.security.Key
This method returns the encoded form of the key. If this key does not support encoding, this method returns null.

Specified by:
getEncoded in interface java.security.Key