1.0.4 • Published 1 year ago
@musical-palm-tree/tokens v1.0.4
Generate Key
(async () => {
let pair = await crypto.subtle.generateKey({ name: 'ECDSA', namedCurve: 'P-384' }, true, [
'sign',
'verify'
]);
console.log({
privateKey: JSON.stringify(await crypto.subtle.exportKey('jwk', pair.privateKey)),
publicKey: JSON.stringify(await crypto.subtle.exportKey('jwk', pair.publicKey))
});
})();