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

createCipher/createDecipher and new Buffer deprecated #49

Open
Js-Brecht opened this issue Nov 22, 2019 · 1 comment
Open

createCipher/createDecipher and new Buffer deprecated #49

Js-Brecht opened this issue Nov 22, 2019 · 1 comment

Comments

@Js-Brecht
Copy link
Contributor

Not really a big deal at the moment... I just thought I would mention that I get warnings that createCipher/createDecipher and new Buffer() are deprecated. The recommended methods are createCipheriv, createDecipheriv and Buffer.from.

Buffer.from is supposed to address some security concerns. Not sure precisely what concerns, since I haven't really looked into it too far.

Cipheriv and Decipheriv are considerably more secure, but also more complex to use. I had to solve this problem not too long ago in one of my projects. If interested, here's the algorithm I used: https://gist.github.com/Js-Brecht/97488f1951d6d35502d331c97b3b3c19

@YujiaCheng1996
Copy link

Deprecated methods won't work on node22. TypeError: crypto_1.default.createCipher is not a function. Really need an update.

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

2 participants