1. /*
  2. * @(#)RSAPublicKeySpec.java 1.6 00/02/02
  3. *
  4. * Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.security.spec;
  11. import java.math.BigInteger;
  12. /**
  13. * This class specifies an RSA public key.
  14. *
  15. * @author Jan Luehe
  16. *
  17. * @version 1.6 00/02/02
  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. public class RSAPublicKeySpec implements KeySpec {
  27. private BigInteger modulus;
  28. private BigInteger publicExponent;
  29. public RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent) {
  30. this.modulus = modulus;
  31. this.publicExponent = publicExponent;
  32. }
  33. /**
  34. * Returns the modulus.
  35. *
  36. * @return the modulus
  37. */
  38. public BigInteger getModulus() {
  39. return this.modulus;
  40. }
  41. /**
  42. * Returns the public exponent.
  43. *
  44. * @return the public exponent
  45. */
  46. public BigInteger getPublicExponent() {
  47. return this.publicExponent;
  48. }
  49. }