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

Add object form of Ed25519 overload for SubtleCrypto#generateKey #1878

Conversation

steveluscher
Copy link
Contributor

@steveluscher steveluscher commented Jan 13, 2025

As a follow up for #1594, I'd like to add the object form of the Edwards curve identifier ({ name: "Ed25519" }) to complement the string form ("Ed25519").

This will prevent having to constantly refine the return type of generateKey when all this API ever returns is a CryptoKeyPair when used with this algorithm.

const key = await crypto.subtle.generateKey(
  { name: 'Ed25519' },
  false, /* extractable */
  ['sign', 'verify'],
) as CryptoKeyPair;

See #1594 for more.

Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

@saschanaz
Copy link
Contributor

LGTM for now, but this still needs more general form.

@github-actions github-actions bot merged commit 2c1e3c3 into microsoft:main Jan 13, 2025
6 checks passed
Copy link
Contributor

Merging because @saschanaz is a code-owner of all the changes - thanks!

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

Successfully merging this pull request may close these issues.

2 participants