KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > security > spec > RSAPrivateKeySpec


1 /*
2  * @(#)RSAPrivateKeySpec.java 1.10 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.security.spec;
9
10 import java.math.BigInteger JavaDoc;
11
12 /**
13  * This class specifies an RSA private key.
14  *
15  * @author Jan Luehe
16  *
17  * @version 1.10 03/12/19
18  *
19  * @see java.security.Key
20  * @see java.security.KeyFactory
21  * @see KeySpec
22  * @see PKCS8EncodedKeySpec
23  * @see RSAPublicKeySpec
24  * @see RSAPrivateCrtKeySpec
25  */

26
27 public class RSAPrivateKeySpec implements KeySpec JavaDoc {
28
29     private BigInteger JavaDoc modulus;
30     private BigInteger JavaDoc privateExponent;
31
32     /**
33      * Creates a new RSAPrivateKeySpec.
34      *
35      * @param modulus the modulus
36      * @param privateExponent the private exponent
37      */

38     public RSAPrivateKeySpec(BigInteger JavaDoc modulus, BigInteger JavaDoc privateExponent) {
39     this.modulus = modulus;
40     this.privateExponent = privateExponent;
41     }
42
43     /**
44      * Returns the modulus.
45      *
46      * @return the modulus
47      */

48     public BigInteger JavaDoc getModulus() {
49     return this.modulus;
50     }
51
52     /**
53      * Returns the private exponent.
54      *
55      * @return the private exponent
56      */

57     public BigInteger JavaDoc getPrivateExponent() {
58     return this.privateExponent;
59     }
60 }
61
Popular Tags