good morning!!!!

Skip to content
Snippets Groups Projects
Commit 0dfe5113 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Use curve params instead of hardcoded 32 bytes

parent d4cc2d35
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ func Sign(hash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error) {
return nil, fmt.Errorf("hash is required to be exactly 32 bytes (%d)", len(hash))
}
sig, err = secp256k1.Sign(hash, ethutil.LeftPadBytes(prv.D.Bytes(), 32))
sig, err = secp256k1.Sign(hash, ethutil.LeftPadBytes(prv.D.Bytes(), prv.Params().BitSize/8))
return
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment