01: /*
02: * @(#)DSAParameterSpec.java 1.19 06/10/10
03: *
04: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: *
26: */
27:
28: package java.security.spec;
29:
30: import java.math.BigInteger;
31:
32: /**
33: * This class specifies the set of parameters used with the DSA algorithm.
34: *
35: * @author Jan Luehe
36: *
37: * @version 1.13, 02/02/00
38: *
39: * @see AlgorithmParameterSpec
40: *
41: * @since 1.2
42: */
43:
44: public class DSAParameterSpec implements AlgorithmParameterSpec,
45: java.security.interfaces.DSAParams {
46:
47: BigInteger p;
48: BigInteger q;
49: BigInteger g;
50:
51: /**
52: * Creates a new DSAParameterSpec with the specified parameter values.
53: *
54: * @param p the prime.
55: *
56: * @param q the sub-prime.
57: *
58: * @param g the base.
59: */
60: public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g) {
61: this .p = p;
62: this .q = q;
63: this .g = g;
64: }
65:
66: /**
67: * Returns the prime <code>p</code>.
68: *
69: * @return the prime <code>p</code>.
70: */
71: public BigInteger getP() {
72: return this .p;
73: }
74:
75: /**
76: * Returns the sub-prime <code>q</code>.
77: *
78: * @return the sub-prime <code>q</code>.
79: */
80: public BigInteger getQ() {
81: return this .q;
82: }
83:
84: /**
85: * Returns the base <code>g</code>.
86: *
87: * @return the base <code>g</code>.
88: */
89: public BigInteger getG() {
90: return this.g;
91: }
92: }
|