KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > ssh2 > signature > DSAPrivateKey


1 package ch.ethz.ssh2.signature;
2
3 import java.math.BigInteger JavaDoc;
4
5 /**
6  * DSAPrivateKey.
7  *
8  * @author Christian Plattner, plattner@inf.ethz.ch
9  * @version $Id: DSAPrivateKey.java,v 1.1 2005/05/26 14:53:30 cplattne Exp $
10  */

11 public class DSAPrivateKey
12 {
13     private BigInteger JavaDoc p;
14     private BigInteger JavaDoc q;
15     private BigInteger JavaDoc g;
16     private BigInteger JavaDoc x;
17     private BigInteger JavaDoc y;
18
19     public DSAPrivateKey(BigInteger JavaDoc p, BigInteger JavaDoc q, BigInteger JavaDoc g,
20             BigInteger JavaDoc y, BigInteger JavaDoc x)
21     {
22         this.p = p;
23         this.q = q;
24         this.g = g;
25         this.y = y;
26         this.x = x;
27     }
28
29     public BigInteger JavaDoc getP()
30     {
31         return p;
32     }
33
34     public BigInteger JavaDoc getQ()
35     {
36         return q;
37     }
38     
39     public BigInteger JavaDoc getG()
40     {
41         return g;
42     }
43
44     public BigInteger JavaDoc getY()
45     {
46         return y;
47     }
48     
49     public BigInteger JavaDoc getX()
50     {
51         return x;
52     }
53     
54     public DSAPublicKey getPublicKey()
55     {
56         return new DSAPublicKey(p, q, g, y);
57     }
58 }
Popular Tags