Search code examples
javascriptcryptojswebcrypto-api

Use js crypto frameworks or browser's Web Crypto API?


I want to use encryption algorithms in browser. I see two ways to do that. First, using available javascript crypto frameworks like cryptojs, sjcl, etc. or the browser's inbuilt Web Crypto API. I am confused on which one is better. Can anyone please help me on this?

Thanks


Solution

  • Because browsers are more integrated with the underlying system than any JavaScript library can be, they will provide a better guarantee of security (e.g. for random number generation).