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 longuse serialVersionUID from JDK 1.1.private BigIntegerFields 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 TypeMethodDescriptionbooleanReturns 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.inthashCode()Calculates a hash code value for the object.protected voidParse 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, parsePublicKeyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getYin interfaceDSAPublicKey
-
toString
-
parseKeyBits
Description copied from class:X509KeyParse 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 thekeybits; 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
parseanddecode.- Overrides:
parseKeyBitsin classX509Key- Throws:
InvalidKeyException- on invalid key encodings.
-
hashCode
public int hashCode()Description copied from class:X509KeyCalculates a hash code value for the object. Objects which are equal will also have the same hashcode. -
equals
-