39 |
|
|
40 |
import java.security.spec.AlgorithmParameterSpec; |
import java.security.spec.AlgorithmParameterSpec; |
41 |
|
|
42 |
|
import gnu.java.security.Engine; |
43 |
|
|
44 |
/** |
/** |
45 |
* <p>The <code>KeyPairGenerator</code> class is used to generate pairs of |
* <p>The <code>KeyPairGenerator</code> class is used to generate pairs of |
46 |
* public and private keys. Key pair generators are constructed using the |
* public and private keys. Key pair generators are constructed using the |
233 |
if (provider == null) |
if (provider == null) |
234 |
throw new IllegalArgumentException("Illegal provider"); |
throw new IllegalArgumentException("Illegal provider"); |
235 |
|
|
236 |
Object o = Engine.getInstance(KEY_PAIR_GENERATOR, algorithm, provider); |
Object o = null; |
237 |
|
try |
238 |
|
{ |
239 |
|
o = Engine.getInstance(KEY_PAIR_GENERATOR, algorithm, provider); |
240 |
|
} |
241 |
|
catch (java.lang.reflect.InvocationTargetException ite) |
242 |
|
{ |
243 |
|
throw new NoSuchAlgorithmException(algorithm); |
244 |
|
} |
245 |
|
|
246 |
KeyPairGenerator result = null; |
KeyPairGenerator result = null; |
247 |
if (o instanceof KeyPairGeneratorSpi) |
if (o instanceof KeyPairGeneratorSpi) |
248 |
{ |
{ |