com.ibm.crypto.fips.provider

Class DSAPublicKey

  1. java.lang.Object
  2. extended bycom.ibm.security.x509.X509Key
  3. extended bycom.ibm.crypto.fips.provider.DSAPublicKey
All implemented interfaces:
java.io.Serializable, java.security.interfaces.DSAKey, java.security.interfaces.DSAPublicKey, java.security.Key, java.security.PublicKey

  1. public final class DSAPublicKey
  2. extends com.ibm.security.x509.X509Key
  3. implements java.security.interfaces.DSAPublicKey, java.io.Serializable
This class represents an X.509 public key for the DSA Algorithm.
Version:
1.00, 07/20/99
Author:
Joyce Leung
See Also:
Serialized Form

Field Summary

Fields inherited from class com.ibm.security.x509.X509Key
algid, encodedKey, key

Constructor Summary

Constructor and Description
DSAPublicKey(java.math.BigInteger y,java.math.BigInteger p,java.math.BigInteger q,java.math.BigInteger g)
Create a new DSA public key from y, p, q, and g.
DSAPublicKey(byte[] encoded)
Make a DSA public key from its DER encoding (X.509).

Method Summary

Modifier and Type Method and Description
  1. protected
  2. void
finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
  1. java.security.interfaces.DSAParams
getParams()
Return the DSA parameters for the receiver.
  1. java.math.BigInteger
getY()
Return the value of the public key.
  1. protected
  2. void
parseKeyBits()
  1. java.lang.String
toString()
  1. void
zeroize()
This function zeroizes the key so that it isn't in memory
Methods inherited from class com.ibm.security.x509.X509Key
decode, decode, encode, encode, equals, getAlgorithm, getAlgorithmId, getEncoded, getFormat, getKey, hashCode, parse, parse, read, readBASE64, setKey, write, writeBASE64
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat

Constructor Detail

DSAPublicKey

  1. public DSAPublicKey(java.math.BigInteger y,
  2. java.math.BigInteger p,
  3. java.math.BigInteger q,
  4. java.math.BigInteger g)
  5. throws java.security.InvalidKeyException
Create a new DSA public key from y, p, q, and g.
Parameters:
y - public key
p - prime modulus
q - prime divisor
g - the number g
Throws:
java.security.InvalidKeyException

DSAPublicKey

  1. public DSAPublicKey(byte[] encoded)
  2. throws java.security.InvalidKeyException
Make a DSA public key from its DER encoding (X.509).
Parameters:
encoded - the encoded bytes of the public key
Throws:
java.security.InvalidKeyException

Method Detail

getY

  1. public java.math.BigInteger getY( )
Return the value of the public key.
Specified by:
getY in interface java.security.interfaces.DSAPublicKey

getParams

  1. public java.security.interfaces.DSAParams getParams( )
Return the DSA parameters for the receiver.
Specified by:
getParams in interface java.security.interfaces.DSAKey
Returns:
DSAParams the DSA parameters of this instance

parseKeyBits

  1. protected void parseKeyBits()
  2. throws java.security.InvalidKeyException
Overrides:
parseKeyBits in class com.ibm.security.x509.X509Key
Throws:
java.security.InvalidKeyException

toString

  1. public java.lang.String toString( )
Overrides:
toString in class com.ibm.security.x509.X509Key

zeroize

  1. public void zeroize()
This function zeroizes the key so that it isn't in memory

finalize

  1. 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