Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | protected function execute(InputInterface $input, OutputInterface $output) |
||
43 | { |
||
44 | $jwk = $input->getArgument('jwk'); |
||
45 | $json = $this->jsonConverter->decode($jwk); |
||
46 | if (!is_array($json)) { |
||
47 | throw new \InvalidArgumentException('Invalid input.'); |
||
48 | } |
||
49 | $key = RSAKey::createFromJWK(JWK::create($json)); |
||
50 | $key->optimize(); |
||
51 | $this->prepareJsonOutput($input, $output, $key->toJwk()); |
||
52 | } |
||
53 | } |
||
54 |