TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: SHA1 Checksum Large Files with HTML5 Typed Arrays and Web Workers

47 pointsby antimatter15over 13 years ago

4 comments

pygorexover 13 years ago
Cool concept and a great usage of WebWorkers. I can see this being useful to verify the integrity of files uploaded via an HTML form - get the SHA1 client-side and verify it against a SHA1 server-side.<p>Unfortunately this implementation is way too slow for large files. In Chrome 15 OSX running a Core 2 Duo 2.4GHz an ~650MB file takes about 9.3 minutes to calculate the resultant SHA. Using openssl the hash generation takes ~8 seconds. (Bearing in mind that it's not fair to compare an interpreted script against a compiled program.)
评论 #3173654 未加载
评论 #3173941 未加载
评论 #3173582 未加载
deskamessover 13 years ago
In worker.js :<p>//Firefox doesn't support FileReader inside WebWorkers<p>I noticed that Firefox has FileReaderSync available only from Web Workers. <a href="https://developer.mozilla.org/en/DOM/FileReaderSync" rel="nofollow">https://developer.mozilla.org/en/DOM/FileReaderSync</a><p>Per spec (<a href="http://dev.w3.org/2006/webapi/FileAPI/#readingOnThreads" rel="nofollow">http://dev.w3.org/2006/webapi/FileAPI/#readingOnThreads</a>) web workers can use both. The use cases I have will work fine with the sync interface, but I wonder why Firefox chose not to provide the async option in workers.
someone13over 13 years ago
OK, this is pretty cool :-)<p>If you don't mind my asking, what's the license on this, if I'd like to use this in one of my projects?
win7guruover 13 years ago
Wow, this is awesome. I prefer using a desktop program for multiple checking, but this is very nice looking. Thanks for the resource.