Reformat source code, new line length for comments (79), some trailing whitespace...
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / DSAGroup.java
1 /*
2  * jFCPlib - DSAGroup.java - Copyright © 2008 David Roden
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18
19 package net.pterodactylus.fcp;
20
21 import java.security.interfaces.DSAParams;
22
23 /**
24  * Container for the DSA group of a peer. A DSA group consists of a base
25  * (called “g”), a prime (called “p”) and a subprime (called “q”).
26  *
27  * @see DSAParams
28  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
29  */
30 public class DSAGroup {
31
32         /** The base of the DSA group. */
33         private final String base;
34
35         /** The prime of the DSA group. */
36         private final String prime;
37
38         /** The subprime of the DSA group. */
39         private final String subprime;
40
41         /**
42          * Creates a new DSA group with the given base (“g”), prime (“p”), and
43          * subprime (“q”).
44          *
45          * @param base
46          *            The base of the DSA group
47          * @param prime
48          *            The prime of the DSA group
49          * @param subprime
50          *            The subprime of the DSA group
51          */
52         public DSAGroup(String base, String prime, String subprime) {
53                 this.base = base;
54                 this.prime = prime;
55                 this.subprime = subprime;
56         }
57
58         /**
59          * Returns the base (“g”) of the DSA group.
60          *
61          * @return The base of the DSA group
62          */
63         public String getBase() {
64                 return base;
65         }
66
67         /**
68          * Returns the prime (“p”) of the DSA group.
69          *
70          * @return The prime of the DSA group
71          */
72         public String getPrime() {
73                 return prime;
74         }
75
76         /**
77          * Returns the subprime (“q”) of the DSA group.
78          *
79          * @return The subprime of the DSA group
80          */
81         public String getSubprime() {
82                 return subprime;
83         }
84
85 }