aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/crypto.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 19:45:15 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 19:45:15 +0800
commit6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea (patch)
tree1b3b3677892e2d94400f3604dc6c2dda4c05ccd4 /crypto/crypto.go
parent5c17b2f5211ec98a87140c874483681de4e34391 (diff)
parentbf5ae502ef179490a039c9bcd66d32cd5a7ce5e9 (diff)
downloadgo-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.gz
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.bz2
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.lz
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.xz
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.zst
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.zip
Merge pull request #2458 from fjl/go-vet
all: fix go vet warnings
Diffstat (limited to 'crypto/crypto.go')
-rw-r--r--crypto/crypto.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/crypto.go b/crypto/crypto.go
index b24d08010..85f097095 100644
--- a/crypto/crypto.go
+++ b/crypto/crypto.go
@@ -107,7 +107,7 @@ func ToECDSAPub(pub []byte) *ecdsa.PublicKey {
return nil
}
x, y := elliptic.Unmarshal(secp256k1.S256(), pub)
- return &ecdsa.PublicKey{secp256k1.S256(), x, y}
+ return &ecdsa.PublicKey{Curve: secp256k1.S256(), X: x, Y: y}
}
func FromECDSAPub(pub *ecdsa.PublicKey) []byte {
@@ -189,7 +189,7 @@ func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) {
}
x, y := elliptic.Unmarshal(secp256k1.S256(), s)
- return &ecdsa.PublicKey{secp256k1.S256(), x, y}, nil
+ return &ecdsa.PublicKey{Curve: secp256k1.S256(), X: x, Y: y}, nil
}
func Sign(hash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error) {