Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
DSAKeyGenerationParameters | 31 | 9 | 0% | 6 | 2 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software 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 GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | package org.xwiki.crypto.params.generator.asymmetric; | |
21 | ||
22 | import java.math.BigInteger; | |
23 | ||
24 | import org.xwiki.crypto.params.generator.KeyGenerationParameters; | |
25 | ||
26 | /** | |
27 | * Shared DSA parameters for key generation. | |
28 | * | |
29 | * @version $Id: 1ad2aa6792adb8277ff06e8c68f243c11c4451a6 $ | |
30 | */ | |
31 | public class DSAKeyGenerationParameters implements KeyGenerationParameters | |
32 | { | |
33 | private final BigInteger p; | |
34 | ||
35 | private final BigInteger q; | |
36 | ||
37 | private final BigInteger g; | |
38 | ||
39 | private final DSAKeyValidationParameters parameters; | |
40 | ||
41 | /** | |
42 | * Initialize DSA shared parameters. | |
43 | * | |
44 | * @param p the prime modulus P. | |
45 | * @param q the prime Q. | |
46 | * @param g the number G. | |
47 | */ | |
48 | 0 | ![]() |
49 | { | |
50 | 0 | this(p, q, g, null); |
51 | } | |
52 | ||
53 | /** | |
54 | * Initialize DSA shared parameters. | |
55 | * | |
56 | * @param p the prime modulus P. | |
57 | * @param q the prime Q. | |
58 | * @param g the number G. | |
59 | * @param parameters the validation parameters. | |
60 | */ | |
61 | 4 | ![]() |
62 | { | |
63 | 4 | this.p = p; |
64 | 4 | this.q = q; |
65 | 4 | this.g = g; |
66 | 4 | this.parameters = parameters; |
67 | } | |
68 | ||
69 | /** | |
70 | * @return the prime modulus P. | |
71 | */ | |
72 | 7 | ![]() |
73 | { | |
74 | 7 | return this.p; |
75 | } | |
76 | ||
77 | /** | |
78 | * @return the prime Q. | |
79 | */ | |
80 | 7 | ![]() |
81 | { | |
82 | 7 | return this.q; |
83 | } | |
84 | ||
85 | /** | |
86 | * @return the number G. | |
87 | */ | |
88 | 5 | ![]() |
89 | { | |
90 | 5 | return this.g; |
91 | } | |
92 | ||
93 | /** | |
94 | * @return the validation parameters. | |
95 | */ | |
96 | 5 | ![]() |
97 | { | |
98 | 5 | return this.parameters; |
99 | } | |
100 | } |