2 * jSite2 - DSAGroup.java -
3 * Copyright © 2008 David Roden
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 package net.pterodactylus.fcp;
22 import java.security.interfaces.DSAParams;
25 * Container for the DSA group of a peer. A DSA group consists of a base (called
26 * “g”), a prime (called “p”) and a subprime (called “q”).
29 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
31 public class DSAGroup {
33 /** The base of the DSA group. */
34 private final String base;
36 /** The prime of the DSA group. */
37 private final String prime;
39 /** The subprime of the DSA group. */
40 private final String subprime;
43 * Creates a new DSA group with the given base (“g”), prime (“p”), and
47 * The base of the DSA group
49 * The prime of the DSA group
51 * The subprime of the DSA group
53 public DSAGroup(String base, String prime, String subprime) {
56 this.subprime = subprime;
60 * Returns the base (“g”) of the DSA group.
62 * @return The base of the DSA group
64 public String getBase() {
69 * Returns the prime (“p”) of the DSA group.
71 * @return The prime of the DSA group
73 public String getPrime() {
78 * Returns the subprime (“q”) of the DSA group.
80 * @return The subprime of the DSA group
82 public String getSubprime() {