From 2b9402f302d3a4edada0e40bd394bbb956f289c9 Mon Sep 17 00:00:00 2001 From: Wei Lu Date: Wed, 28 May 2014 23:10:54 +0800 Subject: [PATCH] Crypto -> CryptoJS --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5077ec7..f31e5df 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -var Crypto = require('crypto-js') +var CryptoJS = require('crypto-js') var path = require('path') var includeFolder = require('include-folder') var Wordlists = includeFolder(path.join(__dirname, 'wordlists')) @@ -12,8 +12,8 @@ function BIP39(language){ } BIP39.prototype.mnemonicToSeed = function(mnemonic, password){ - var options = {iterations: 2048, hasher: Crypto.algo.SHA512, keySize: 512/32} - return Crypto.PBKDF2(mnemonic, salt(password), options).toString(Crypto.enc.Hex) + var options = {iterations: 2048, hasher: CryptoJS.algo.SHA512, keySize: 512/32} + return CryptoJS.PBKDF2(mnemonic, salt(password), options).toString(CryptoJS.enc.Hex) } BIP39.prototype.entropyToMnemonic = function(entropy){