Compare commits

...
5 Commits
Author SHA1 Message Date
Mathias Buus 5ccdcdee17 0.5.4 2017-11-19 13:16:51 +01:00
Mathias Buus 48081c6896 ignore crypto in the browser 2017-11-19 13:16:35 +01:00
Mathias Buus b1741bfdae 0.5.3 2017-11-17 12:09:34 +01:00
Mathias Buus f7de366eec fix shorthash_ready being deprecated 2017-11-17 12:07:52 +01:00
Mathias Buus 51e11143e5 fix siphash24 not having ready 2017-11-17 10:43:01 +01:00
3 changed files with 5 additions and 7 deletions
-5
View File
@@ -5,13 +5,8 @@ exports.crypto_shorthash_BYTES = siphash.BYTES
exports.crypto_shorthash_KEYBYTES = siphash.KEYBYTES
exports.crypto_shorthash_WASM_SUPPORTED = siphash.WASM_SUPPORTED
exports.crypto_shorthash_WASM_LOADED = siphash.WASM_LOADED
exports.crypto_shorthash_ready = siphash.ready
exports.crypto_shorthash = shorthash
siphash.ready(function () {
exports.crypto_shorthash_WASM_LOADED = siphash.WASM_LOADED
})
function shorthash (out, data, key, noAssert) {
siphash(data, key, out, noAssert)
}
+4 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sodium-javascript",
"version": "0.5.2",
"version": "0.5.4",
"description": "WIP - a pure javascript version of sodium-native",
"main": "index.js",
"dependencies": {
@@ -14,6 +14,9 @@
"browserify": "^14.1.0",
"sodium-test": "^0.7.0"
},
"browser": {
"crypto": false
},
"scripts": {
"browser": "browserify test.js | browser-run",
"browser-manual": "browserify test.js | browser-run -p 1234",
+1 -1
View File
@@ -21,7 +21,7 @@ var randombytes = (function () {
return browserBytes
} else if (typeof require !== 'undefined') {
// Node.js.
crypto = require('cry' + 'pto');
crypto = require('crypto')
if (crypto && crypto.randomBytes) {
return nodeBytes
}