Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ccdcdee17 | ||
|
|
48081c6896 |
+4
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sodium-javascript",
|
"name": "sodium-javascript",
|
||||||
"version": "0.5.3",
|
"version": "0.5.4",
|
||||||
"description": "WIP - a pure javascript version of sodium-native",
|
"description": "WIP - a pure javascript version of sodium-native",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -14,6 +14,9 @@
|
|||||||
"browserify": "^14.1.0",
|
"browserify": "^14.1.0",
|
||||||
"sodium-test": "^0.7.0"
|
"sodium-test": "^0.7.0"
|
||||||
},
|
},
|
||||||
|
"browser": {
|
||||||
|
"crypto": false
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"browser": "browserify test.js | browser-run",
|
"browser": "browserify test.js | browser-run",
|
||||||
"browser-manual": "browserify test.js | browser-run -p 1234",
|
"browser-manual": "browserify test.js | browser-run -p 1234",
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ var randombytes = (function () {
|
|||||||
return browserBytes
|
return browserBytes
|
||||||
} else if (typeof require !== 'undefined') {
|
} else if (typeof require !== 'undefined') {
|
||||||
// Node.js.
|
// Node.js.
|
||||||
crypto = require('cry' + 'pto');
|
crypto = require('crypto')
|
||||||
if (crypto && crypto.randomBytes) {
|
if (crypto && crypto.randomBytes) {
|
||||||
return nodeBytes
|
return nodeBytes
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user