1 |
/* AlgorithmParameters.java --- Algorithm Parameters Implementation Class |
/* AlgorithmParameters.java --- Algorithm Parameters Implementation Class |
2 |
Copyright (C) 1999, 2003 Free Software Foundation, Inc. |
Copyright (C) 1999, 2003, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
35 |
obligated to do so. If you do not wish to do so, delete this |
obligated to do so. If you do not wish to do so, delete this |
36 |
exception statement from your version. */ |
exception statement from your version. */ |
37 |
|
|
|
package java.security; |
|
38 |
|
|
39 |
import java.security.spec.InvalidParameterSpecException; |
package java.security; |
|
import java.security.spec.AlgorithmParameterSpec; |
|
|
import java.io.IOException; |
|
40 |
|
|
41 |
import gnu.java.security.Engine; |
import gnu.java.security.Engine; |
42 |
|
|
43 |
|
import java.io.IOException; |
44 |
|
import java.security.spec.AlgorithmParameterSpec; |
45 |
|
import java.security.spec.InvalidParameterSpecException; |
46 |
|
|
47 |
/** |
/** |
48 |
* <p>This class is used as an opaque representation of cryptographic |
* <p>This class is used as an opaque representation of cryptographic |
49 |
* parameters.</p> |
* parameters.</p> |
137 |
throws NoSuchAlgorithmException |
throws NoSuchAlgorithmException |
138 |
{ |
{ |
139 |
Provider[] p = Security.getProviders(); |
Provider[] p = Security.getProviders(); |
140 |
|
|
141 |
for (int i = 0; i < p.length; i++) |
for (int i = 0; i < p.length; i++) |
142 |
try |
try |
143 |
{ |
{ |
144 |
return getInstance(algorithm, p[i]); |
return getInstance(algorithm, p[i]); |
145 |
} |
} |
146 |
catch (NoSuchAlgorithmException ignored) {} |
catch (NoSuchAlgorithmException e) |
147 |
|
{ |
148 |
|
// Ignore this. |
149 |
|
} |
150 |
|
|
151 |
throw new NoSuchAlgorithmException(algorithm); |
throw new NoSuchAlgorithmException(algorithm); |
152 |
} |
} |