Opened 17 years ago

Closed 17 years ago

#183 closed defect (invalid)

MD5 does not calculate correctly.

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: Core Version: 0.1
Keywords: md5 Cc:
Blocked By: Blocking:


Index: MD5.js
--- MD5.js      (revision 2021)
+++ MD5.js      (working copy)
@@ -22,8 +22,8 @@
        function roll(num,cnt) { return (num<<cnt)|(num>>>(32-cnt)); }
        this.compute=function(x,len) {
+               if (!len) var len=x.length*chrsz;
                if (typeof(x)=="string") x=dojo.crypto.toByteArray(x);
-               if (!len) var len=x.length;
                var a= 1732584193;

Something else... would it make sense to set chrsz's value based on djConfig option?

djConfig.unicode = true; chrsz = djConfig.unicode?16:8;

Change History (1)

comment:1 Changed 17 years ago by [email protected]

Resolution: invalid
Status: newclosed

MD5 is still unreleased code, and undergoing a *lot* of rework. I'm going to close this bug and keep unicode support in mind.

Note: See TracTickets for help on using tickets.