kopia lustrzana https://github.com/cloudflare/wildebeest
7 wiersze
271 B
JavaScript
7 wiersze
271 B
JavaScript
![]() |
import { webcrypto } from 'node:crypto'
|
||
|
|
||
|
const key = await webcrypto.subtle.generateKey({ name: "ECDSA", namedCurve: "P-256" }, true, ["sign", "verify"]);
|
||
|
const serverKey = await webcrypto.subtle.exportKey("jwk", key.privateKey);
|
||
|
|
||
|
console.log(JSON.stringify(serverKey));
|