aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore/keystore_passphrase.go
diff options
context:
space:
mode:
authorEgon Elbre <egonelbre@gmail.com>2017-08-07 19:11:15 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-07 19:11:15 +0800
commit7c74e166b0ee14cf040374f522bc399841a11e69 (patch)
tree5359ee39cc5f8a504cc2c734263a235ba8a6607a /accounts/keystore/keystore_passphrase.go
parentf7848c2aa509ff4ac7c0f84e33bdb66b8fe3e80a (diff)
downloaddexon-7c74e166b0ee14cf040374f522bc399841a11e69.tar
dexon-7c74e166b0ee14cf040374f522bc399841a11e69.tar.gz
dexon-7c74e166b0ee14cf040374f522bc399841a11e69.tar.bz2
dexon-7c74e166b0ee14cf040374f522bc399841a11e69.tar.lz
dexon-7c74e166b0ee14cf040374f522bc399841a11e69.tar.xz
dexon-7c74e166b0ee14cf040374f522bc399841a11e69.tar.zst
dexon-7c74e166b0ee14cf040374f522bc399841a11e69.zip
accounts: fix megacheck warnings (#14903)
* accounts: fix megacheck warnings * accounts: don't modify abi in favor of full cleanup
Diffstat (limited to 'accounts/keystore/keystore_passphrase.go')
-rw-r--r--accounts/keystore/keystore_passphrase.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/accounts/keystore/keystore_passphrase.go b/accounts/keystore/keystore_passphrase.go
index 679fc15d6..535608a60 100644
--- a/accounts/keystore/keystore_passphrase.go
+++ b/accounts/keystore/keystore_passphrase.go
@@ -140,7 +140,7 @@ func EncryptKey(key *Key, auth string, scryptN, scryptP int) ([]byte, error) {
Cipher: "aes-128-ctr",
CipherText: hex.EncodeToString(cipherText),
CipherParams: cipherParamsJSON,
- KDF: "scrypt",
+ KDF: keyHeaderKDF,
KDFParams: scryptParamsJSON,
MAC: hex.EncodeToString(mac),
}
@@ -275,7 +275,7 @@ func getKDFKey(cryptoJSON cryptoJSON, auth string) ([]byte, error) {
}
dkLen := ensureInt(cryptoJSON.KDFParams["dklen"])
- if cryptoJSON.KDF == "scrypt" {
+ if cryptoJSON.KDF == keyHeaderKDF {
n := ensureInt(cryptoJSON.KDFParams["n"])
r := ensureInt(cryptoJSON.KDFParams["r"])
p := ensureInt(cryptoJSON.KDFParams["p"])