How can I generate downloaded file's MD5/SHA1/SHA-256 using chrome API or other way?
Asked
Active
Viewed 4,948 times
4
-
Maybe it will be helpful? http://stackoverflow.com/questions/1655769/fastest-md5-implementation-in-javascript – Łukasz Bendig Nov 07 '14 at 15:07
-
I can easily make md5 hash from string. But I need md5 from downloaded file. My experience says that it is not possible only with js. If there is any way of chrome API it is possible. @ŁukaszBendig. file_hash and String hash are different. – Touhid Nov 07 '14 at 16:05
-
@Touhid have you looked at [crypto-js](http://code.google.com/p/crypto-js) ? – wsdookadr Jan 02 '15 at 02:53
1 Answers
3
To generate MD5/SHA1 for file you need to access the file. At this stage extensions are just like advance webapps for most browsers. Native system support is not available to extensions for security purpose. File system API(http://www.w3.org/TR/FileAPI/) is not widely available or what is available is just for experimental.
Check following:
https://stackoverflow.com/a/768287/3260012
I hope this will help you.

Community
- 1
- 1

Saurin Dashadia
- 1,140
- 11
- 25