note 126637 added to function.openssl-pkey-new
| From: | Andrew at main dot php dot net | Date: | Wed, 24 Nov 2021 19:17:44 +0000 |
| Subject: | note 126637 added to function.openssl-pkey-new | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217293@lists.php.net to get a copy of this message | ||
It's not documented here but you can also create ECC keys from existing key parameters (e.g.
from JWK):
<?php
$key = openssl_pkey_new([
'ec' => [
'curve_name' => 'prime256v1',
'x' => $someXValue,
'y' => $someYValue,
'd' => $someDValue
]
]);
?>
You can just provide x/y if it's a public key, or you can just provide d if it's a private
key.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 125.236.208.204)
----
Manual Page -- https://php.net/manual/en/function.openssl-pkey-new.php
Edit -- https://main.php.net/note/edit/126637
Del: integrated -- https://main.php.net/note/delete/126637/integrated
Del: useless -- https://main.php.net/note/delete/126637/useless
Del: bad code -- https://main.php.net/note/delete/126637/bad+code
Del: spam -- https://main.php.net/note/delete/126637/spam
Del: non-english -- https://main.php.net/note/delete/126637/non-english
Del: in docs -- https://main.php.net/note/delete/126637/in+docs
Del: other reasons-- https://main.php.net/note/delete/126637
Reject -- https://main.php.net/note/reject/126637
Search -- https://main.php.net/manage/user-notes.php