Comparing version 1.0.2 to 1.0.3
@@ -33,2 +33,8 @@ var Crypto = require('crypto-js') | ||
BIP39.prototype.generateMnemonic = function(strength){ | ||
var strength = strength || 128 | ||
var entropy = crypto.randomBytes(strength/8).toString('hex') | ||
return this.entropyToMnemonic(entropy) | ||
} | ||
function salt(password) { | ||
@@ -35,0 +41,0 @@ return encode_utf8('mnemonic' + (password || '')) |
{ | ||
"name": "bip39", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Bitcoin BIP39: Mnemonic code for generating deterministic keys", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,6 +20,5 @@ bip39 | ||
// '5cf2d4a8b0355e90295bdfc565a022a409af063d5365bb57bf74d9528f494bfa4400f53d8349b80fdae44082d7f9541e1dba2b003bcfec9d0d53781ca676651f' | ||
bip39.generateMnemonic() // strength defaults to 128 bits | ||
// 'seed sock milk update focus rotate barely fade car face mechanic mercy' | ||
``` | ||
## TODO | ||
- generateMnemonic |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35622
2266
24