getPublicKeyFromPrivateKey
Call Signature
Given an extractable CryptoKey
private key, gets the corresponding public key as a
CryptoKey.
The public key is always extractable, since public keys are not secret. This mirrors the
behavior of crypto.subtle.generateKey(),
and is required by verifySignature, which reads the bytes of the public key.
Parameters
| Parameter | Type |
|---|---|
privateKey | CryptoKey |
Returns
Example
Call Signature
Parameters
| Parameter | Type | Description |
|---|---|---|
privateKey | CryptoKey | - |
extractable | boolean | Ignored; the public key is always extractable. |
Returns
Deprecated
The extractable argument is ignored; the public key is always extractable. Omit it.