add IdentifierCollision
[jSite2.git] / src / net / pterodactylus / util / fcp / DSAGroup.java
1 package net.pterodactylus.util.fcp;
2
3 import java.security.interfaces.DSAParams;
4
5 /**
6  * Container for the DSA group of a peer. A DSA group consists of a base
7  * (called “g”), a prime (called “p”) and a subprime (called “q”).
8  * 
9  * @see DSAParams
10  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
11  * @version $Id$
12  */
13 public class DSAGroup {
14
15         /** The base of the DSA group. */
16         private final String base;
17
18         /** The prime of the DSA group. */
19         private final String prime;
20
21         /** The subprime of the DSA group. */
22         private final String subprime;
23
24         /**
25          * Creates a new DSA group with the given base (“g”), prime (“p”), and
26          * subprime (“q”).
27          * 
28          * @param base
29          *            The base of the DSA group
30          * @param prime
31          *            The prime of the DSA group
32          * @param subprime
33          *            The subprime of the DSA group
34          */
35         public DSAGroup(String base, String prime, String subprime) {
36                 this.base = base;
37                 this.prime = prime;
38                 this.subprime = subprime;
39         }
40
41         /**
42          * Returns the base (“g”) of the DSA group.
43          * 
44          * @return The base of the DSA group
45          */
46         public String getBase() {
47                 return base;
48         }
49
50         /**
51          * Returns the prime (“p”) of the DSA group.
52          * 
53          * @return The prime of the DSA group
54          */
55         public String getPrime() {
56                 return prime;
57         }
58
59         /**
60          * Returns the subprime (“q”) of the DSA group.
61          * 
62          * @return The subprime of the DSA group
63          */
64         public String getSubprime() {
65                 return subprime;
66         }
67
68 }