1 | <?php |
||
33 | final class JWKFactory implements JWKFactoryInterface |
||
34 | { |
||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public static function createPublicKeySet(JWKSetInterface $jwkset) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public static function createKeySets(array $jwksets = []) |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public static function createStorableKey($filename, array $parameters) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public static function createRotatableKeySet($filename, array $parameters, $nb_keys) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public static function createStorableKeySet($filename, array $parameters, $nb_keys) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public static function createKey(array $config) |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | public static function createRSAKey(array $values) |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public static function createECKey(array $values) |
||
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | public static function createOctKey(array $values) |
||
159 | |||
160 | /** |
||
161 | * {@inheritdoc} |
||
162 | */ |
||
163 | public static function createOKPKey(array $values) |
||
194 | |||
195 | /** |
||
196 | * {@inheritdoc} |
||
197 | */ |
||
198 | public static function createNoneKey(array $values) |
||
211 | |||
212 | /** |
||
213 | * @param string $value |
||
214 | * |
||
215 | * @return string |
||
216 | */ |
||
217 | private static function encodeValue($value) |
||
223 | |||
224 | /** |
||
225 | * @param string $value |
||
226 | * |
||
227 | * @return string |
||
228 | */ |
||
229 | private static function convertDecToBin($value) |
||
235 | |||
236 | /** |
||
237 | * @param string $curve |
||
238 | * |
||
239 | * @throws \InvalidArgumentException |
||
240 | * |
||
241 | * @return string |
||
242 | */ |
||
243 | private static function getNistName($curve) |
||
256 | |||
257 | /** |
||
258 | * {@inheritdoc} |
||
259 | */ |
||
260 | public static function createFromValues(array $values) |
||
268 | |||
269 | /** |
||
270 | * {@inheritdoc} |
||
271 | */ |
||
272 | public static function createFromCertificateFile($file, array $additional_values = []) |
||
279 | |||
280 | /** |
||
281 | * {@inheritdoc} |
||
282 | */ |
||
283 | public static function createFromCertificate($certificate, array $additional_values = []) |
||
290 | |||
291 | /** |
||
292 | * {@inheritdoc} |
||
293 | */ |
||
294 | public static function createFromX509Resource($res, array $additional_values = []) |
||
301 | |||
302 | /** |
||
303 | * {@inheritdoc} |
||
304 | */ |
||
305 | public static function createFromKeyFile($file, $password = null, array $additional_values = []) |
||
312 | |||
313 | /** |
||
314 | * {@inheritdoc} |
||
315 | */ |
||
316 | public static function createFromKey($key, $password = null, array $additional_values = []) |
||
323 | |||
324 | /** |
||
325 | * {@inheritdoc} |
||
326 | */ |
||
327 | public static function createFromJKU($jku, $allow_unsecured_connection = false, CacheItemPoolInterface $cache = null, $ttl = 86400, $allow_http_connection = false) |
||
331 | |||
332 | /** |
||
333 | * {@inheritdoc} |
||
334 | */ |
||
335 | public static function createFromX5U($x5u, $allow_unsecured_connection = false, CacheItemPoolInterface $cache = null, $ttl = 86400, $allow_http_connection = false) |
||
339 | |||
340 | /** |
||
341 | * {@inheritdoc} |
||
342 | */ |
||
343 | public static function createFromX5C(array $x5c, array $additional_values = []) |
||
350 | |||
351 | /** |
||
352 | * {@inheritdoc} |
||
353 | */ |
||
354 | public static function createFromKeySet(JWKSetInterface $jwk_set, $key_index) |
||
360 | } |
||
361 |