aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/fiveui/injected/fiveui-injected-compute.js
diff options
context:
space:
mode:
authorGravatar Benjamin Jones <bjones@galois.com>2012-10-05 16:23:33 -0700
committerGravatar Benjamin Jones <bjones@galois.com>2012-10-05 16:23:33 -0700
commit087f2dce8ff273eaee33afaf7af353d6cd2d98ec (patch)
tree440620aef85e5ddf1097bfc0419c4e1e44e6db77 /contexts/data/fiveui/injected/fiveui-injected-compute.js
parent064242b703b85ede1b3359eb804d51ccefcf1c25 (diff)
upgraded problem hash to md5
Diffstat (limited to 'contexts/data/fiveui/injected/fiveui-injected-compute.js')
-rw-r--r--contexts/data/fiveui/injected/fiveui-injected-compute.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/contexts/data/fiveui/injected/fiveui-injected-compute.js b/contexts/data/fiveui/injected/fiveui-injected-compute.js
index 0c62b05..7e0f516 100644
--- a/contexts/data/fiveui/injected/fiveui-injected-compute.js
+++ b/contexts/data/fiveui/injected/fiveui-injected-compute.js
@@ -115,14 +115,7 @@
var str = prob.name + prob.descr + prob.url + prob.severity
+ name + nodeHash(node);
- prob.hash = 0;
- for(var i=0; i<str.length; ++i) {
- var x = str.charCodeAt(i);
- prob.hash = ((prob.hash << 5) - prob.hash) + x;
- prob.hash = prob.hash & prob.hash; // convert to 32-bit?
- }
-
- prob.hash = prob.hash.toString();
+ prob.hash = hex_md5(str); // hex_md5() is from md5.js
return prob;
};