sha256-universal
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -16,3 +16,3 @@ const js = require('./sha256.js') | ||
module.exports.WASM_SUPPORTED = wasm.SUPPORTED | ||
module.exports.WASM_SUPPORTED = wasm.WASM_SUPPORTED | ||
module.exports.WASM_LOADED = false | ||
@@ -19,0 +19,0 @@ |
{ | ||
"name": "sha256-universal", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Sha256 hashing algorithm in both WASM and pure JS", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"sha256-wasm": "^1.3.0" | ||
"sha256-wasm": "^2.0.3" | ||
}, | ||
@@ -12,0 +12,0 @@ "devDependencies": { |
@@ -227,9 +227,1 @@ if (btoa == null) var btoa = buf => require('buf' + 'fer')['Buf' + 'fer'].from(buf).toString('base64') | ||
} | ||
function printWords (w) { | ||
for (let i = 0; i < w.length; i++) console.log(signedInt(w[i]).toString(16)) | ||
} | ||
function signedInt (i) { | ||
return i < 0 ? 2 ** 32 + i : i | ||
} |
16
test.js
const sha256 = require('./') | ||
require('sha-test').sha256(sha256) | ||
const js256 = require('./sha256') | ||
const test = require('sha-test').sha256 | ||
if (!sha256.WASM_SUPPORTED) { | ||
console.log('testing JavaScript implementation') | ||
test(sha256) | ||
} else { | ||
sha256.ready(() => { | ||
console.log('testing WebAssembly implementation') | ||
test(sha256) | ||
console.log('testing JavaScript implementation') | ||
test(js256) | ||
}) | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8108
215
+ Addedb4a@1.6.7(transitive)
+ Addedsha256-wasm@2.2.2(transitive)
- Removedsha256-wasm@1.3.0(transitive)
Updatedsha256-wasm@^2.0.3