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
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
Share Improve this question edited Aug 31, 2016 at 8:38 tech-y asked Aug 30, 2016 at 9:38 tech-ytech-y 1,8872 gold badges16 silver badges26 bronze badges 4- 1 What would you achieve with browser-based encryption? What's the problem you're solving? – Mjh Commented Aug 30, 2016 at 12:31
- Without any objective requirements I can say: whatever you like. You can toss a coin and let it be decided by chance. Also, have a look at Javascript Cryptography Considered Harmful – Artjom B. Commented Aug 30, 2016 at 21:26
- I have already undergone through the article. I only want to create a hash of a file and just save that hash for a future reference and that's it. I know there are problems with the browser based encryption, but in my case, it is desired. – tech-y Commented Aug 31, 2016 at 8:37
- If your use scenario is for puting hashes, then I personally would opt for Web Crypto API. As for what's better - what does better mean? Both interfaces should produce the same result for a given input if you're after hashes. – Mjh Commented Aug 31, 2016 at 12:54
1 Answer
Reset to default 8Because 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).
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745467763a4628990.html
评论列表(0条)