Functions
getPublicKeyFromPrivateKey
getPublicKeyFromPrivateKey(
privateKey
,extractable?
):Promise
<CryptoKey
>
Given an extractable CryptoKey
private key, gets the corresponding public key as a
CryptoKey
.
Parameters
Parameter | Type | Description |
---|---|---|
privateKey | CryptoKey | - |
extractable? | boolean | Setting this to true makes it possible to extract the bytes of the public key using the crypto.subtle.exportKey() API. Defaults to false . |