Opened 15 years ago

Closed 15 years ago

#1622 closed defect (invalid)

Bug in (and inadequit fix for) dojo.crypt.SHA1

Reported by: [email protected] Owned by: Tom Trenka
Priority: high Milestone: 0.9
Component: Crypto Version: 0.3
Keywords: sha1, crypto Cc:
Blocked By: Blocking:


dojo.crypt.SHA1.compute() isn't producing good Hex or Base64. I was able to fix it for Hex by comparing it to the source code it was originally ported from. However, I don't really understand my fix. Basically, the two additional "24-" parts cause it to generate the correct integers but in the reverse endian order that toHex() expects. So, the other part of the fix just makes toHex() work with reversed endian order. Someone who knows more about math needs to look at this.

Attachments (1)

dojo-sha1.patch (918 bytes) - added by [email protected] 15 years ago.
My very bad fix.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by [email protected]

Attachment: dojo-sha1.patch added

My very bad fix.

comment:1 Changed 15 years ago by dylan


comment:2 Changed 15 years ago by Tom Trenka


Oh hey, that should have been marked as experimental at best, my apologies. I'll be rewriting it for 0.5.

comment:3 Changed 15 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

I'm going to close this in favor of the outstanding Crypto task I have assigned to myself.

Note: See TracTickets for help on using tickets.