KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)RSAPublicKeySpec.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 public 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 X509EncodedKeySpec
23  * @see RSAPrivateKeySpec
24  * @see RSAPrivateCrtKeySpec
25  */

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

38     public RSAPublicKeySpec(BigInteger JavaDoc modulus, BigInteger JavaDoc publicExponent) {
39     this.modulus = modulus;
40     this.publicExponent = publicExponent;
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 public exponent.
54      *
55      * @return the public exponent
56      */

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