KickJava   Java API By Example, From Geeks To Geeks.

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


1 package ch.ethz.ssh2.signature;
2
3 import java.math.BigInteger JavaDoc;
4
5 /**
6  * RSAPrivateKey.
7  *
8  * @author Christian Plattner, plattner@inf.ethz.ch
9  * @version $Id: RSAPrivateKey.java,v 1.1 2005/08/11 12:47:29 cplattne Exp $
10  */

11 public class RSAPrivateKey
12 {
13     private BigInteger JavaDoc d;
14     private BigInteger JavaDoc e;
15     private BigInteger JavaDoc n;
16
17     public RSAPrivateKey(BigInteger JavaDoc d, BigInteger JavaDoc e, BigInteger JavaDoc n)
18     {
19         this.d = d;
20         this.e = e;
21         this.n = n;
22     }
23
24     public BigInteger JavaDoc getD()
25     {
26         return d;
27     }
28     
29     public BigInteger JavaDoc getE()
30     {
31         return e;
32     }
33
34     public BigInteger JavaDoc getN()
35     {
36         return n;
37     }
38     
39     public RSAPublicKey getPublicKey()
40     {
41         return new RSAPublicKey(e, n);
42     }
43 }
Popular Tags