Compare commits

..
2 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
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sodium-javascript",
"version": "0.5.3",
"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
}