Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kerin committed May 4, 2017
1 parent 14a1e19 commit ce67cb7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion secp256k1/ec_pubkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ func TestPubkeyCombineWithOneReturnsSame(t *testing.T) {
assert.Equal(t, pubkey, combinedPoint)
}


func TestPubkeyCombineInvalidSum(t *testing.T) {
ctx, err := ContextCreate(ContextSign | ContextVerify)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions secp256k1/ecdh_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package secp256k1

import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"testing"
"encoding/hex"
)

func TestEcdhCatchesOverflow(t *testing.T) {
Expand All @@ -12,7 +12,7 @@ func TestEcdhCatchesOverflow(t *testing.T) {
panic(err)
}

alice, _:= hex.DecodeString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364142")
alice, _ := hex.DecodeString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364142")
bob := []byte{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}

r, Bob, err := EcPubkeyCreate(ctx, bob)
Expand All @@ -30,7 +30,7 @@ func TestEcdhInvalidKey(t *testing.T) {
panic(err)
}

alice, _:= hex.DecodeString("")
alice, _ := hex.DecodeString("")
bob := []byte{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}

r, Bob, err := EcPubkeyCreate(ctx, bob)
Expand Down
18 changes: 9 additions & 9 deletions secp256k1/secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ const (
LenCompactSig int = 64
LenMaxDerSig int = 72

ErrorEcdh string = "Unable to do ECDH"
ErrorPublicKeyCreate string = "Unable to produce public key"
ErrorPublicKeyCombine string = "Unable to combine public keys"
ErrorNullPrivateKey string = ""
ErrorNullSignature string = ""
ErrorNullCompactSignature string = ""
ErrorNullRecoverableSignature string = ""
ErrorNullPublicKey string = ""
ErrorNullMsgHash string = ""
ErrorEcdh string = "Unable to do ECDH"
ErrorPublicKeyCreate string = "Unable to produce public key"
ErrorPublicKeyCombine string = "Unable to combine public keys"
ErrorNullPrivateKey string = ""
ErrorNullSignature string = ""
ErrorNullCompactSignature string = ""
ErrorNullRecoverableSignature string = ""
ErrorNullPublicKey string = ""
ErrorNullMsgHash string = ""

ErrorTweakSize string = "Tweak must be exactly 32 bytes"
ErrorMsg32Size string = "Message hash must be exactly 32 bytes"
Expand Down

0 comments on commit ce67cb7

Please sign in to comment.