Socket
Socket
Sign inDemoInstall

sha256-universal

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sha256-universal - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

index.js

@@ -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
}
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)
})
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc