2 * jFCPlib - DSAGroup.java - Copyright © 2008–2016 David Roden
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 3 of the License, or
7 * (at your option) any later version.
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.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package net.pterodactylus.fcp;
20 import java.security.interfaces.DSAParams;
23 * Container for the DSA group of a peer. A DSA group consists of a base
24 * (called “g”), a prime (called “p”) and a subprime (called “q”).
27 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
29 public class DSAGroup {
31 /** The base of the DSA group. */
32 private final String base;
34 /** The prime of the DSA group. */
35 private final String prime;
37 /** The subprime of the DSA group. */
38 private final String subprime;
41 * Creates a new DSA group with the given base (“g”), prime (“p”), and
45 * The base of the DSA group
47 * The prime of the DSA group
49 * The subprime of the DSA group
51 public DSAGroup(String base, String prime, String subprime) {
54 this.subprime = subprime;
58 * Returns the base (“g”) of the DSA group.
60 * @return The base of the DSA group
62 public String getBase() {
67 * Returns the prime (“p”) of the DSA group.
69 * @return The prime of the DSA group
71 public String getPrime() {
76 * Returns the subprime (“q”) of the DSA group.
78 * @return The subprime of the DSA group
80 public String getSubprime() {