1/* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18package java.security.spec; 19 20/** 21 * The parameter specification used to generate elliptic curve domain parameters. 22 */ 23public class ECGenParameterSpec implements AlgorithmParameterSpec { 24 // Standard (or predefined) name for EC domain 25 // parameters to be generated 26 private final String name; 27 28 /** 29 * Creates a new {@code ECGenParameterSpec} with the specified standard or 30 * predefined name of the to-be-generated domain parameter. 31 * 32 * @param name 33 * the name of the elliptic curve domain parameter. 34 */ 35 public ECGenParameterSpec(String name) { 36 this.name = name; 37 if (this.name == null) { 38 throw new NullPointerException("name == null"); 39 } 40 } 41 42 /** 43 * Returns the name (standard or predefined) of the to-be-generated elliptic 44 * curve domain parameter. 45 * 46 * @return the name 47 */ 48 public String getName() { 49 return name; 50 } 51} 52