Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | public static function compute(string $accountKey): array |
||
8 | { |
||
9 | $privateKey = openssl_pkey_get_private($accountKey); |
||
10 | |||
11 | $details = openssl_pkey_get_details($privateKey); |
||
|
|||
12 | |||
13 | return [ |
||
14 | 'e' => Base64::urlSafeEncode($details['rsa']['e']), |
||
15 | 'kty' => 'RSA', |
||
16 | 'n' => Base64::urlSafeEncode($details['rsa']['n']), |
||
17 | ]; |
||
24 | } |