0.1.0 release! - tests pass now

This commit is contained in:
Amrit Panesar committed 2017-04-18 13:05:54 -07:00
1 parent a47c1cadfe
commit 014a5fc06c
4 files changed
+20 -15

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>
+2 -2
View File
@@ -348,8 +348,8 @@
}
return {
hex: _hex,
raw: _raw
hex: _hex.apply(this, arguments),
raw: _raw.apply(this, arguments)
};
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "node-md6",
"version": "0.0.7",
"version": "0.1.0",
"description": "MD6 Implementation in Node",
"main": "md6.js",
"files": [
+11 -12
View File
@@ -1,26 +1,25 @@
var md6hash = require("../md6").md6hash;
var md6 = require("../md6");
var fs = require("fs");
var md6 = new md6hash();
var result = fs.readFileSync("result.csv", "ascii");
result = result.split("\n");
var total = 0, ok = 0;
for(var i in result) {
var line = result[i];
if(line === "") break;
for (var i in result) {
var line = result[i];
if (line === "") break;
var a = line.split(",");
var a = line.split(",");
var size = parseInt(a[0], 10);
var data = a[1];
var comp = a[2];
var size = parseInt(a[0], 10);
var data = a[1];
var comp = a[2];
var hash = md6.hex(data, size);
var hash = md6.getHashOfText(data, size);
total++;
if(hash === comp) ok++;
total++;
if (hash === comp) ok++;
}
console.log("" + ok + " / " + total + " test(s) passed.");