|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 2 (10.1.2.0.2) B15565-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.core.DSAParams
Parameters used for the Digital Signature Standard, as described in FIPS 186. The parameter names used here match that reference.
The necessary parameters to implement DSA are:
The following ASN.1 encoding is used, defined in the PKIX draft standard:
Dss-Parms ::= SEQUENCE { p INTEGER, q INTEGER, g INTEGER }
A DSAParams may also store the seed and counter used to generate p and q.
Warning: The serialization capability of this class should only be used for short-term storage and RMI between applications running the same version of this product. It should not be relied on for long-term perisistence, as future versions of this class may use an incompatible serialization format. For now, applications requiring long-term persistence should use the ASN.1 encodings provided by the input(InputStream)
and output(OutputStream)
methods directly, instead of serialization.
Constructor Summary | |
DSAParams() Creates a new, noninitialized DSAParams object. |
|
DSAParams(ASN1Sequence s) Creates a new DSAParams object by parsing the given ASN.1 sequence. |
|
DSAParams(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g) Creates a new DSAParams object with the given values of p, q, and g. |
|
DSAParams(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, byte[] seed, int counter) Creates a new DSAParams object with the given values of p, q, g, seed and counter. |
|
DSAParams(java.io.InputStream is) Creates a new DSAParams object by reading its encoding from the given input stream. |
Method Summary | |
int |
getCounter() Get the counter that was used generate these parameters. |
java.math.BigInteger |
getG() Gets g. |
java.math.BigInteger |
getP() Gets p. |
java.math.BigInteger |
getQ() Gets q. |
byte[] |
getSeed() Gets the seed that was used generate these parameters. |
void |
input(ASN1Sequence s) parses a DSAParams object from given ASN1Sequence. |
void |
input(java.io.InputStream is) reads the encoding of a DSAParams object from given InputStream. |
int |
length() Returns the length of this object's encoding. |
void |
output(java.io.OutputStream os) Outputs the encoding of this DSAParams object to the given OutputStream. |
ASN1Sequence |
outputASN1() Outputs this DSAParams object to the given ASN1Sequence. |
java.lang.String |
toString() Transforms this DSAParams object into a readable string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DSAParams()
DSAParams
object.public DSAParams(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g)
p
- the large prime pq
- the small prime qg
- the generator gpublic DSAParams(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, byte[] seed, int counter)
p
- the large prime pq
- the small prime qg
- the generator gseed
- the seed used to generate p and q.counter
- the counter used to generate p and q.public DSAParams(java.io.InputStream is) throws java.io.IOException
is
- the inputStream where the DSAParam comes fromjava.io.IOException
- If an input exception occured.public DSAParams(ASN1Sequence s) throws java.io.IOException
s
- the ASN1Sequence representing the DSAParams.java.io.IOException
- If an input exception occured.Method Detail |
public java.math.BigInteger getP()
null
if p is not initializedpublic java.math.BigInteger getQ()
null
if q is not initializedpublic java.math.BigInteger getG()
null
if g is not initializedpublic byte[] getSeed()
null
if seed is not initializedpublic int getCounter()
null
if the count is not initializedpublic void input(java.io.InputStream is) throws java.io.IOException
input
in interface Streamable
is
- the inputStream where the DSAParam comes fromjava.io.IOException
- If an input exception occured.output(java.io.OutputStream)
public void input(ASN1Sequence s) throws java.io.IOException
s
- the ASN1Sequence representing the DSAParams.java.io.IOException
- If an input exception occured.outputASN1()
public void output(java.io.OutputStream os) throws java.io.IOException
DSAParams
object to the given OutputStream.output
in interface Streamable
os
- the OutputStream where this DSAParams
will gojava.io.IOException
- If an output exception occured.input(InputStream)
public ASN1Sequence outputASN1()
DSAParams
object to the given ASN1Sequence.DSAParams
will goinput(ASN1Sequence)
public int length()
length
in interface Streamable
public java.lang.String toString()
DSAParams
object into a readable string.DSAParams
object
|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 2 (10.1.2.0.2) B15565-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |