| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | public function parse(string $formattedKey): PrivateKeyInterface |
||
| 48 | { |
||
| 49 | $formattedKey = str_replace('-----BEGIN EC PRIVATE KEY-----', '', $formattedKey); |
||
| 50 | $formattedKey = str_replace('-----END EC PRIVATE KEY-----', '', $formattedKey); |
||
| 51 | |||
| 52 | $data = base64_decode($formattedKey); |
||
| 53 | |||
| 54 | return $this->derSerializer->parse($data); |
||
| 55 | } |
||
| 57 |