diff options
Diffstat (limited to 'crypto/key_store_plain.go')
-rw-r--r-- | crypto/key_store_plain.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/key_store_plain.go b/crypto/key_store_plain.go index 2ade11985..6a8afe27d 100644 --- a/crypto/key_store_plain.go +++ b/crypto/key_store_plain.go @@ -98,12 +98,12 @@ func (ks keyStorePlain) DeleteKey(keyAddr common.Address, auth string) (err erro } func GetKeyFile(keysDirPath string, keyAddr common.Address) (fileContent []byte, err error) { - fileName := keyAddr.Hex() + fileName := hex.EncodeToString(keyAddr[:]) return ioutil.ReadFile(filepath.Join(keysDirPath, fileName, fileName)) } func WriteKeyFile(addr common.Address, keysDirPath string, content []byte) (err error) { - addrHex := addr.Hex() + addrHex := hex.EncodeToString(addr[:]) keyDirPath := filepath.Join(keysDirPath, addrHex) keyFilePath := filepath.Join(keyDirPath, addrHex) err = os.MkdirAll(keyDirPath, 0700) // read, write and dir search for user |