sindresorhus / project-ideas

Need a JavaScript module or looking for ideas? Welcome ✨
544 stars 9 forks source link

Encryption module #132

Open Richienb opened 3 years ago

Richienb commented 3 years ago

Like crypto-hash but implements encryption and decryption rather than hashing. There appears to be encryption APIs built-in to browsers as well as Node.js so it would be useful to access them in an easy way.

sindresorhus commented 3 years ago

https://github.com/nodejs/node/blob/6fdd5827f0956ffc4e7ffe31babaf530e42f75b9/doc/api/webcrypto.md

Richienb commented 3 years ago

So that means the only thing that needs to be done is importing the API in the environment-specific way and making it easier? to use.

sindresorhus commented 3 years ago

I assume that when the module is no longer experimental, they'll make the APIs globals, like in the browser.

Making them easier to use sounds nice in theory, but you need to know what you're doing. You might as well make it worse and potentially introduce security issues. Be careful if you decide to do this.