Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function serialize(PrivateKeyInterface $key): string |
||
33 | { |
||
34 | $privateKeyInfo = $this->derSerializer->serialize($key); |
||
35 | |||
36 | $content = '-----BEGIN EC PRIVATE KEY-----'.PHP_EOL; |
||
37 | $content .= trim(chunk_split(base64_encode($privateKeyInfo), 64, PHP_EOL)).PHP_EOL; |
||
38 | $content .= '-----END EC PRIVATE KEY-----'; |
||
39 | |||
40 | return $content; |
||
41 | } |
||
57 |