public final class AlgIdDSA extends AlgorithmId implements java.security.interfaces.DSAParams
NOTE: At this time, DSS/DSA Algorithm IDs must always include these parameters. Use of DSS/DSA in modes where parameters are either implicit (e.g. a default applicable to a site or a larger scope), or are derived from some Certificate Authority's DSS certificate, is not currently supported.
ALL_SIGNING_ALGORITHMS, ANSIX962_EC_Public_Key_oid, ANSIX962_SHA1_With_EC_oid, DH_oid, DH_PKIX_oid, DSA_oid, DSA_OIW_oid, DSA_SIGNING_ALGORITHMS, EC_SIGNING_ALGORITHMS, MD2_oid, md2WithRSAEncryption_oid, MD5_oid, md5WithRSAEncryption_oid, MGF1_oid, params, paramsString, RSA_oid, RSA_SIGNING_ALGORITHMS, RSAEncryption_oid, rsaPSS_oid, SHA_oid, sha1WithDSA_oid, sha1WithDSA_OIW_oid, sha1WithEC_oid, sha1WithRSAEncryption_oid, sha1WithRSAEncryption_OIW_oid, sha224WithEC_oid, SHA256_oid, sha256WithEC_oid, sha256WithRSAEncryption_oid, SHA384_oid, sha384WithEC_oid, sha384WithRSAEncryption_oid, SHA512_oid, sha512WithEC_oid, sha512WithRSAEncryption_oid, shaWithDSA_OIW_oid
Constructor and Description |
---|
AlgIdDSA(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g)
Constructs a DSS/DSA Algorithm ID from numeric parameters.
|
AlgIdDSA(byte[] encodedAlg)
Construct an AlgIdDSA from an X.509 encoded byte array.
|
AlgIdDSA(byte[] p,
byte[] q,
byte[] g)
Constructs a DSS/DSA Algorithm ID from unsigned integers that
define the algorithm parameters.
|
Modifier and Type | Method and Description |
---|---|
protected void |
decodeParams()
Parses algorithm parameters P, Q, and G.
|
boolean |
equals(java.lang.Object obj)
Compares this AlgorithmID to another.
|
java.math.BigInteger |
getG()
Returns the DSS/DSA parameter "G"
|
java.lang.String |
getName()
Returns "DSA", indicating the Digital Signature Algorithm (DSA) as
defined by the Digital Signature Standard (DSS), FIPS 186.
|
java.math.BigInteger |
getP()
Returns the DSS/DSA parameter "P"
|
java.math.BigInteger |
getQ()
Returns the DSS/DSA parameter "Q"
|
int |
hashCode() |
protected java.lang.String |
paramsToString()
Provides a human-readable description of the algorithm parameters.
|
java.lang.String |
toString()
Returns a string describing only the algorithm without parameters.
|
createPSSAlgorithmParameters, createPSSAlgorithmParametersFromData, derEncode, derEncodeWithContext, encode, encode, equals, equals, get, getEncodedParams, getOID, getParameters, getParametersString, getSigningAlgorithms, parse, parse, setParametersString, toStringWithParams
public AlgIdDSA(byte[] encodedAlg) throws java.io.IOException
java.io.IOException
public AlgIdDSA(byte[] p, byte[] q, byte[] g) throws java.io.IOException
p
- the DSS/DSA paramter "P"q
- the DSS/DSA paramter "Q"g
- the DSS/DSA paramter "G"java.io.IOException
public AlgIdDSA(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g)
p
- the DSS/DSA paramter "P"q
- the DSS/DSA paramter "Q"g
- the DSS/DSA paramter "G"public java.math.BigInteger getP()
getP
in interface java.security.interfaces.DSAParams
public java.math.BigInteger getQ()
getQ
in interface java.security.interfaces.DSAParams
public java.math.BigInteger getG()
getG
in interface java.security.interfaces.DSAParams
public java.lang.String getName()
getName
in class AlgorithmId
protected void decodeParams() throws java.io.IOException
decodeParams
in class AlgorithmId
java.io.IOException
public java.lang.String toString()
AlgorithmId
toString
in class AlgorithmId
protected java.lang.String paramsToString()
AlgorithmId
paramsToString
in class AlgorithmId
public int hashCode()
hashCode
in class AlgorithmId
public boolean equals(java.lang.Object obj)
AlgorithmId
equals
in class AlgorithmId
obj
- preferably an AlgorithmId, else an ObjectIdentifier