|
|
@ -52,7 +52,7 @@ func BenchmarkSha3(b *testing.B) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func Test0Key(t *testing.T) { |
|
|
|
func Test0Key(t *testing.T) { |
|
|
|
|
|
|
|
t.Skip() |
|
|
|
key := ethutil.Hex2Bytes("1111111111111111111111111111111111111111111111111111111111111111") |
|
|
|
key := ethutil.Hex2Bytes("1111111111111111111111111111111111111111111111111111111111111111") |
|
|
|
|
|
|
|
|
|
|
|
p, err := secp256k1.GeneratePubKey(key) |
|
|
|
p, err := secp256k1.GeneratePubKey(key) |
|
|
@ -60,3 +60,15 @@ func Test0Key(t *testing.T) { |
|
|
|
fmt.Printf("%x\n", p) |
|
|
|
fmt.Printf("%x\n", p) |
|
|
|
fmt.Printf("%v %x\n", err, addr) |
|
|
|
fmt.Printf("%v %x\n", err, addr) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func TestInvalidSign(t *testing.T) { |
|
|
|
|
|
|
|
_, err := Sign(make([]byte, 1), nil) |
|
|
|
|
|
|
|
if err == nil { |
|
|
|
|
|
|
|
t.Errorf("expected sign with hash 1 byte to error") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_, err = Sign(make([]byte, 33), nil) |
|
|
|
|
|
|
|
if err == nil { |
|
|
|
|
|
|
|
t.Errorf("expected sign with hash 33 byte to error") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|