Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix issue #3 same hash for random integers

custom behavior for everything other than string or byte array
  • Loading branch information...
commit 404110ab0eeef5bb5e0878a99c32748c047b473b 1 parent c39a7dc
Paul Vorbach authored

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  md5.js
2  md5.js
@@ -8,6 +8,8 @@
8 8
     // Convert to byte array
9 9
     if (message.constructor == String)
10 10
       message = utf8.stringToBytes(message);
  11
+    else if (typeof message != 'object')
  12
+      message = message.toString();
11 13
     // else, assume byte array already
12 14
 
13 15
     var m = crypt.bytesToWords(message),

0 notes on commit 404110a

Please sign in to comment.
Something went wrong with that request. Please try again.