Class DSAPublicKey

java.lang.Object
org.mozilla.jss.netscape.security.x509.X509Key
org.mozilla.jss.netscape.security.provider.DSAPublicKey
All Implemented Interfaces:
Serializable, DSAKey, DSAPublicKey, Key, PublicKey

public final class DSAPublicKey extends X509Key implements DSAPublicKey
An X.509 public key for the Digital Signature Algorithm.
Version:
1.52, 97/12/10
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      use serialVersionUID from JDK 1.1. for interoperability
      See Also:
    • y

      private BigInteger y
  • Constructor Details

  • Method Details

    • getParams

      public DSAParams getParams()
      Returns the DSA parameters associated with this key, or null if the parameters could not be parsed.
      Specified by:
      getParams in interface DSAKey
    • getY

      public BigInteger getY()
      Get the raw public value, y, without the parameters.
      Specified by:
      getY in interface DSAPublicKey
    • toString

      public String toString()
      Overrides:
      toString in class X509Key
    • parseKeyBits

      protected void parseKeyBits() throws InvalidKeyException
      Description copied from class: X509Key
      Parse the key bits. This may be redefined by subclasses to take advantage of structure within the key. For example, RSA public keys encapsulate two unsigned integers (modulus and exponent) as DER values within the key bits; Diffie-Hellman and DSS/DSA keys encapsulate a single unsigned integer.

      This function is called when creating X.509 SubjectPublicKeyInfo values using the X509Key member functions, such as parse and decode.

      Overrides:
      parseKeyBits in class X509Key
      Throws:
      InvalidKeyException - on invalid key encodings.
    • hashCode

      public int hashCode()
      Description copied from class: X509Key
      Calculates a hash code value for the object. Objects which are equal will also have the same hashcode.
      Overrides:
      hashCode in class X509Key
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class X509Key