1. /*
  2. * @(#)ECGenParameterSpec.java 1.3 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. package java.security.spec;
  8. /**
  9. * This immutable class specifies the set of parameters used for
  10. * generating elliptic curve (EC) domain parameters.
  11. *
  12. * @see AlgorithmParameterSpec
  13. *
  14. * @author Valerie Peng
  15. * @version 1.3, 12/19/03
  16. *
  17. * @since 1.5
  18. */
  19. public class ECGenParameterSpec implements AlgorithmParameterSpec {
  20. private String name;
  21. /**
  22. * Creates a parameter specification for EC parameter
  23. * generation using a standard (or predefined) name
  24. * <code>stdName</code> in order to generate the corresponding
  25. * (precomputed) elliptic curve domain parameters. For the
  26. * list of supported names, please consult the documentation
  27. * of provider whose implementation will be used.
  28. * @param stdName the standard name of the to-be-generated EC
  29. * domain parameters.
  30. * @exception NullPointerException if <code>stdName</code>
  31. * is null.
  32. */
  33. public ECGenParameterSpec(String stdName) {
  34. if (stdName == null) {
  35. throw new NullPointerException("stdName is null");
  36. }
  37. this.name = stdName;
  38. }
  39. /**
  40. * Returns the standard or predefined name of the
  41. * to-be-generated EC domain parameters.
  42. * @return the standard or predefined name.
  43. */
  44. public String getName() {
  45. return name;
  46. }
  47. }