1. /*
  2. * @(#)RSAPrivateKeySpec.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 private 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 PKCS8EncodedKeySpec
  23. * @see RSAPublicKeySpec
  24. * @see RSAPrivateCrtKeySpec
  25. */
  26. public class RSAPrivateKeySpec implements KeySpec {
  27. private BigInteger modulus;
  28. private BigInteger privateExponent;
  29. public RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent) {
  30. this.modulus = modulus;
  31. this.privateExponent = privateExponent;
  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 private exponent.
  43. *
  44. * @return the private exponent
  45. */
  46. public BigInteger getPrivateExponent() {
  47. return this.privateExponent;
  48. }
  49. }