aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ecies/ecies.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 17:06:57 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 17:17:27 +0800
commit6fdd0893c3ebf57e5a9ba2af569c595c859ab902 (patch)
tree2df67265a0350b68b2f10ba2f7dcd292fef59ad0 /crypto/ecies/ecies.go
parent68c755a238f1a204087c2843f01d48fc6039716f (diff)
downloaddexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.gz
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.bz2
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.lz
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.xz
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.zst
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.zip
all: fix go vet warnings
Diffstat (limited to 'crypto/ecies/ecies.go')
-rw-r--r--crypto/ecies/ecies.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go
index ee4285617..86a70261d 100644
--- a/crypto/ecies/ecies.go
+++ b/crypto/ecies/ecies.go
@@ -60,7 +60,7 @@ type PublicKey struct {
// Export an ECIES public key as an ECDSA public key.
func (pub *PublicKey) ExportECDSA() *ecdsa.PublicKey {
- return &ecdsa.PublicKey{pub.Curve, pub.X, pub.Y}
+ return &ecdsa.PublicKey{Curve: pub.Curve, X: pub.X, Y: pub.Y}
}
// Import an ECDSA public key as an ECIES public key.
@@ -83,7 +83,7 @@ type PrivateKey struct {
func (prv *PrivateKey) ExportECDSA() *ecdsa.PrivateKey {
pub := &prv.PublicKey
pubECDSA := pub.ExportECDSA()
- return &ecdsa.PrivateKey{*pubECDSA, prv.D}
+ return &ecdsa.PrivateKey{PublicKey: *pubECDSA, D: prv.D}
}
// Import an ECDSA private key as an ECIES private key.