KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > security > spec > DSAParameterSpec


1 /*
2  * @(#)DSAParameterSpec.java 1.16 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.security.spec;
9
10 import java.math.BigInteger JavaDoc;
11
12 /**
13  * This class specifies the set of parameters used with the DSA algorithm.
14  *
15  * @author Jan Luehe
16  *
17  * @version 1.16, 12/19/03
18  *
19  * @see AlgorithmParameterSpec
20  *
21  * @since 1.2
22  */

23
24 public class DSAParameterSpec implements AlgorithmParameterSpec JavaDoc,
25 java.security.interfaces.DSAParams JavaDoc {
26
27     BigInteger JavaDoc p;
28     BigInteger JavaDoc q;
29     BigInteger JavaDoc g;
30
31     /**
32      * Creates a new DSAParameterSpec with the specified parameter values.
33      *
34      * @param p the prime.
35      *
36      * @param q the sub-prime.
37      *
38      * @param g the base.
39      */

40     public DSAParameterSpec(BigInteger JavaDoc p, BigInteger JavaDoc q, BigInteger JavaDoc g) {
41     this.p = p;
42     this.q = q;
43     this.g = g;
44     }
45
46     /**
47      * Returns the prime <code>p</code>.
48      *
49      * @return the prime <code>p</code>.
50      */

51     public BigInteger JavaDoc getP() {
52     return this.p;
53     }
54
55     /**
56      * Returns the sub-prime <code>q</code>.
57      *
58      * @return the sub-prime <code>q</code>.
59      */

60     public BigInteger JavaDoc getQ() {
61     return this.q;
62     }
63
64     /**
65      * Returns the base <code>g</code>.
66      *
67      * @return the base <code>g</code>.
68      */

69     public BigInteger JavaDoc getG() {
70     return this.g;
71     }
72 }
73
Popular Tags