admin管理员组文章数量:1426066
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).
本文标签: javascriptUse js crypto frameworks or browser39s Web Crypto APIStack Overflow
版权声明:本文标题:javascript - Use js crypto frameworks or browser's Web Crypto API? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745467763a2659606.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论