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

[Feature] Implement crypto.createCipheriv #3277

Open
vicb opened this issue Dec 28, 2024 · 4 comments
Open

[Feature] Implement crypto.createCipheriv #3277

vicb opened this issue Dec 28, 2024 · 4 comments
Assignees
Labels
crypto feature request Request for Workers team to add a feature nodejs compat

Comments

@vicb
Copy link
Contributor

vicb commented Dec 28, 2024

crypto.createCipheriv is required by Next Auth.

See opennextjs/opennextjs-cloudflare#206

Can we prioritize the implementation of the API?

@jasnell

The crypto APIs are used by Next from crypto-utils.ts

What is used by Next is:

// * Ciphers
// * [x] crypto.createCipheriv(algorithm, key, iv[, options])
// * [x] crypto.createDecipheriv(algorithm, key, iv[, options])

with the aes-256-gcm algo

@jasnell
Copy link
Member

jasnell commented Dec 28, 2024

Was can likely prioritize more of the node:crypto APIs in 1Q

@jasnell jasnell added feature request Request for Workers team to add a feature nodejs compat labels Jan 2, 2025
@jasnell jasnell added the crypto label Jan 9, 2025
@jasnell jasnell self-assigned this Jan 9, 2025
@albertocavalcante
Copy link

Hi there! Do you know if there's any workaround in the meantime? Thanks!

@jasnell
Copy link
Member

jasnell commented Jan 10, 2025

The only workaround is to use web crypto.

@vicb
Copy link
Contributor Author

vicb commented Jan 10, 2025

The only workaround is to use web crypto.

The code is the Nextjs lib, not in user code so changing to use webcrypto is not trivial.
I would way your only chance is to check if you can setup Next to use a different algo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto feature request Request for Workers team to add a feature nodejs compat
Projects
None yet
Development

No branches or pull requests

3 participants