mirror of
https://github.com/status-im/bip39.git
synced 2025-01-24 03:19:02 +00:00
Crypto -> CryptoJS
This commit is contained in:
parent
9593d0b287
commit
2b9402f302
6
index.js
6
index.js
@ -1,4 +1,4 @@
|
|||||||
var Crypto = require('crypto-js')
|
var CryptoJS = require('crypto-js')
|
||||||
var path = require('path')
|
var path = require('path')
|
||||||
var includeFolder = require('include-folder')
|
var includeFolder = require('include-folder')
|
||||||
var Wordlists = includeFolder(path.join(__dirname, 'wordlists'))
|
var Wordlists = includeFolder(path.join(__dirname, 'wordlists'))
|
||||||
@ -12,8 +12,8 @@ function BIP39(language){
|
|||||||
}
|
}
|
||||||
|
|
||||||
BIP39.prototype.mnemonicToSeed = function(mnemonic, password){
|
BIP39.prototype.mnemonicToSeed = function(mnemonic, password){
|
||||||
var options = {iterations: 2048, hasher: Crypto.algo.SHA512, keySize: 512/32}
|
var options = {iterations: 2048, hasher: CryptoJS.algo.SHA512, keySize: 512/32}
|
||||||
return Crypto.PBKDF2(mnemonic, salt(password), options).toString(Crypto.enc.Hex)
|
return CryptoJS.PBKDF2(mnemonic, salt(password), options).toString(CryptoJS.enc.Hex)
|
||||||
}
|
}
|
||||||
|
|
||||||
BIP39.prototype.entropyToMnemonic = function(entropy){
|
BIP39.prototype.entropyToMnemonic = function(entropy){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user