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
An X.509 public key for the Digital Signature Algorithm.
- Version:
- 1.52, 97/12/10
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
use serialVersionUID from JDK 1.1.private BigInteger
Fields inherited from class org.mozilla.jss.netscape.security.x509.X509Key
algid, encodedKey, key
-
Constructor Summary
ConstructorsConstructorDescriptionDSAPublicKey
(byte[] encoded) Make a DSA public key from its DER encoding (X.509).DSAPublicKey
(BigInteger y, BigInteger p, BigInteger q, BigInteger g) Make a DSA public key out of a public key and three parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the DSA parameters associated with this key, or null if the parameters could not be parsed.getY()
Get the raw public value, y, without the parameters.int
hashCode()
Calculates a hash code value for the object.protected void
Parse the key bits.toString()
Methods inherited from class org.mozilla.jss.netscape.security.x509.X509Key
decode, decode, encode, encode, getAlgorithm, getAlgorithmId, getEncoded, getFormat, getKey, parse, parsePublicKey
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDuse serialVersionUID from JDK 1.1. for interoperability- See Also:
-
y
-
-
Constructor Details
-
DSAPublicKey
public DSAPublicKey() -
DSAPublicKey
public DSAPublicKey(BigInteger y, BigInteger p, BigInteger q, BigInteger g) throws InvalidKeyException Make a DSA public key out of a public key and three parameters.- Throws:
InvalidKeyException
-
DSAPublicKey
Make a DSA public key from its DER encoding (X.509).- Throws:
InvalidKeyException
-
-
Method Details
-
getParams
Returns the DSA parameters associated with this key, or null if the parameters could not be parsed. -
getY
Get the raw public value, y, without the parameters.- Specified by:
getY
in interfaceDSAPublicKey
-
toString
-
parseKeyBits
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 thekey
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
anddecode
.- Overrides:
parseKeyBits
in classX509Key
- 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. -
equals
-