tag:blogger.com,1999:blog-12753102.post3702637038503318844..comments2024-03-28T15:41:37.170-04:00Comments on Ben's Journal: Gotcha of the Day: Calculating an SHA1 hash of a binary file on iOS in PhoneGapBen Simonhttp://www.blogger.com/profile/09833753747177544979noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-12753102.post-45365594541115166022015-10-28T12:29:18.663-04:002015-10-28T12:29:18.663-04:00I have to say man, you saved my life it took me 3 ...I have to say man, you saved my life it took me 3 hrs today to figure out why the hell encryption doesn't return same values as it did before (i forgot to add the lib-typedarrays.js to repository) and only your blog helped me to remember... Unknownhttps://www.blogger.com/profile/08030077025947984205noreply@blogger.comtag:blogger.com,1999:blog-12753102.post-7760383235156517512014-06-06T15:56:45.798-04:002014-06-06T15:56:45.798-04:00For the final function did you mean: var hash = C...For the final function did you mean: var hash = CryptoJS.SHA1(CryptoJS.lib.WordArray.create(new Uint8Array(bytes)));? notice data was replaced by bytes. I dont see where data was defined.Anonymoushttps://www.blogger.com/profile/12942837684912846460noreply@blogger.comtag:blogger.com,1999:blog-12753102.post-77831994830031113942014-04-13T04:38:43.468-04:002014-04-13T04:38:43.468-04:00This post saved me hours of figuring out crypto...This post saved me hours of figuring out crypto's hidden lib-typedarrays dep.<br /><br />Only problem is, even after patching lib-typedarrays, safari is still producing the wrong digest. Firefox, Chrome, Opera even... all working. And I've verified that the conditional I patched is being skipped--the patch works, but it's not enough. Did you ever deal with this?<br /><br />Regardless, thanks for the tips on lib-typedarrays. Saved my butt.Anonymousnoreply@blogger.com