Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECDSAKeyIdentity from privateKey and publicKey #820

Open
honopu opened this issue Jan 12, 2024 · 0 comments
Open

ECDSAKeyIdentity from privateKey and publicKey #820

honopu opened this issue Jan 12, 2024 · 0 comments

Comments

@honopu
Copy link

honopu commented Jan 12, 2024

Describe the solution you'd like
I had use ECDSAKeyIdentity.fromKeyPair,but when i use crypto.subtle.importKey to crypto the privateKey and publicKey, throw Cannot create a key using the specified key usages.

This is the code

await window.crypto.subtle.importKey("raw", privateKey, { name: "ECDSA", namedCurve: "P-256" }, false, ["sign"]);

So ECDSAKeyIdentity could import from privateKey and publicKey? Or how to crypto the privatekey and publicKey?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant