bip39-light
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,4 +1,9 @@ | ||
var randomBytes | ||
if (typeof window !== 'undefined' && window.crypto) { | ||
randomBytes = window.crypto.getRandomValues | ||
} else { | ||
randomBytes = require('crypto').randomBytes | ||
} | ||
var createHash = require('create-hash') | ||
var pbkdf2 = require('pbkdf2').pbkdf2Sync | ||
var randombytes = require('crypto').randomBytes | ||
@@ -107,3 +112,3 @@ var ENGLISH_WORDLIST = require('./wordlists/english.json') | ||
if (strength % 32 !== 0) throw new TypeError(INVALID_ENTROPY) | ||
rng = rng || randombytes | ||
rng = rng || randomBytes | ||
@@ -110,0 +115,0 @@ return entropyToMnemonic(rng(strength / 8), wordlist) |
{ | ||
"name": "bip39-light", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Bitcoin BIP39: Mnemonic code for generating deterministic keys, a lightweight fork", | ||
@@ -25,2 +25,3 @@ "main": "index.js", | ||
"create-hash": "^1.1.0", | ||
"crypto": "^1.0.1", | ||
"pbkdf2": "^3.0.9" | ||
@@ -27,0 +28,0 @@ }, |
var bip39 = require('../') | ||
var Buffer = require('safe-buffer').Buffer | ||
var WORDLISTS = { | ||
@@ -4,0 +3,0 @@ english: require('../wordlists/english.json'), |
73892
4461
3
+ Addedcrypto@^1.0.1
+ Addedcrypto@1.0.1(transitive)