cmd/utils, crypto: add --lightkdf flag for lighter KDF

This commit is contained in:
Drake Burroughs
2015-10-23 16:49:36 +02:00
parent 6b5a42a15c
commit 05ea8926c3
7 changed files with 41 additions and 22 deletions

View File

@ -128,7 +128,7 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) {
db, _ := ethdb.NewMemDatabase()
addr := common.HexToAddress(testAddress)
core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr, common.String2Big(testBalance)})
ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore"))
ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore"), crypto.LightScryptN, crypto.LightScryptP)
am := accounts.NewManager(ks)
keyb, err := crypto.HexToECDSA(testKey)
if err != nil {

View File

@ -106,7 +106,7 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) {
}
// create a testAddress
ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore")
ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore", crypto.LightScryptN, crypto.LightScryptP)
am := accounts.NewManager(ks)
testAccount, err := am.NewAccount("password")
if err != nil {