public final class DSAPublicKey extends X509Key implements java.security.interfaces.DSAPublicKey, java.io.Serializable
DSAPrivateKey,
AlgIdDSA,
Serialized Formalgid, encodedKey, key| Constructor and Description |
|---|
DSAPublicKey() |
DSAPublicKey(java.math.BigInteger y,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g)
Make a DSA public key out of a public key and three parameters.
|
DSAPublicKey(byte[] encoded)
Make a DSA public key from its DER encoding (X.509).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.security.interfaces.DSAParams |
getParams()
Returns the DSA parameters associated with this key, or null if the
parameters could not be parsed.
|
java.math.BigInteger |
getY()
Get the raw public value, y, without the parameters.
|
int |
hashCode()
Calculates a hash code value for the object.
|
protected void |
parseKeyBits()
Parse the key bits.
|
java.lang.String |
toString() |
decode, decode, encode, encode, getAlgorithm, getAlgorithmId, getEncoded, getFormat, getKey, parse, parsePublicKeypublic DSAPublicKey()
public DSAPublicKey(java.math.BigInteger y,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g)
throws java.security.InvalidKeyException
java.security.InvalidKeyExceptionpublic DSAPublicKey(byte[] encoded)
throws java.security.InvalidKeyException
java.security.InvalidKeyExceptionpublic java.security.interfaces.DSAParams getParams()
getParams in interface java.security.interfaces.DSAKeypublic java.math.BigInteger getY()
getY in interface java.security.interfaces.DSAPublicKeyprotected void parseKeyBits()
throws java.security.InvalidKeyException
X509Keykey 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.
parseKeyBits in class X509Keyjava.security.InvalidKeyException - on invalid key encodings.public int hashCode()
X509Key