Opened 13 years ago

Closed 13 years ago

#1622 closed defect (invalid)

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

Reported by: dsnopek@… Owned by: Tom Trenka
Priority: high Milestone: 0.9
Component: Crypto Version: 0.3
Keywords: sha1, crypto Cc:
Blocked By: Blocking:

Description

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 dsnopek@… 13 years ago.
My very bad fix.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by dsnopek@…

Attachment: dojo-sha1.patch added

My very bad fix.

comment:1 Changed 13 years ago by dylan

Milestone: 0.40.4.1

comment:2 Changed 13 years ago by Tom Trenka

Milestone: 0.4.10.5

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

comment:3 Changed 13 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.