aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/key_store_passphrase.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-01-20 05:12:22 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-01-20 05:12:22 +0800
commitd48140cab39923bb06bb4df8667efd2df000d17b (patch)
tree10ede9b41cffb810992dbc7d3d32b9737a34fb08 /crypto/key_store_passphrase.go
parent3cf038f300950c5a14b99fb0249ec09f663ef6af (diff)
downloaddexon-d48140cab39923bb06bb4df8667efd2df000d17b.tar
dexon-d48140cab39923bb06bb4df8667efd2df000d17b.tar.gz
dexon-d48140cab39923bb06bb4df8667efd2df000d17b.tar.bz2
dexon-d48140cab39923bb06bb4df8667efd2df000d17b.tar.lz
dexon-d48140cab39923bb06bb4df8667efd2df000d17b.tar.xz
dexon-d48140cab39923bb06bb4df8667efd2df000d17b.tar.zst
dexon-d48140cab39923bb06bb4df8667efd2df000d17b.zip
Address pull request comments
* Further simplify "constructor" function's allocation of structs * Fix formatting
Diffstat (limited to 'crypto/key_store_passphrase.go')
-rw-r--r--crypto/key_store_passphrase.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/crypto/key_store_passphrase.go b/crypto/key_store_passphrase.go
index 68135a4f0..e30a0a785 100644
--- a/crypto/key_store_passphrase.go
+++ b/crypto/key_store_passphrase.go
@@ -89,10 +89,7 @@ type keyStorePassphrase struct {
}
func NewKeyStorePassphrase(path string) KeyStore2 {
- ks := &keyStorePassphrase{
- keysDirPath : path,
- }
- return ks
+ return &keyStorePassphrase{path}
}
func (ks keyStorePassphrase) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) {
@@ -105,8 +102,8 @@ func (ks keyStorePassphrase) GetKey(keyId *uuid.UUID, auth string) (key *Key, er
return nil, err
}
key = &Key{
- Id : keyId,
- PrivateKey : ToECDSA(keyBytes),
+ Id: keyId,
+ PrivateKey: ToECDSA(keyBytes),
}
return key, err
}