1. /*
  2. * @(#)DSAParameterSpec.java 1.13 00/02/02
  3. *
  4. * Copyright 1997-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 the set of parameters used with the DSA algorithm.
  14. *
  15. * @author Jan Luehe
  16. *
  17. * @version 1.13, 02/02/00
  18. *
  19. * @see AlgorithmParameterSpec
  20. *
  21. * @since 1.2
  22. */
  23. public class DSAParameterSpec implements AlgorithmParameterSpec,
  24. java.security.interfaces.DSAParams {
  25. BigInteger p;
  26. BigInteger q;
  27. BigInteger g;
  28. /**
  29. * Creates a new DSAParameterSpec with the specified parameter values.
  30. *
  31. * @param p the prime.
  32. *
  33. * @param q the sub-prime.
  34. *
  35. * @param g the base.
  36. */
  37. public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g) {
  38. this.p = p;
  39. this.q = q;
  40. this.g = g;
  41. }
  42. /**
  43. * Returns the prime <code>p</code>.
  44. *
  45. * @return the prime <code>p</code>.
  46. */
  47. public BigInteger getP() {
  48. return this.p;
  49. }
  50. /**
  51. * Returns the sub-prime <code>q</code>.
  52. *
  53. * @return the sub-prime <code>q</code>.
  54. */
  55. public BigInteger getQ() {
  56. return this.q;
  57. }
  58. /**
  59. * Returns the base <code>g</code>.
  60. *
  61. * @return the base <code>g</code>.
  62. */
  63. public BigInteger getG() {
  64. return this.g;
  65. }
  66. }