Skip to content
Snippets Groups Projects
Commit c08c815d authored by crokkon's avatar crokkon
Browse files

ecdsasig: allow to skip hashing on signing

parent 5dc0af37
No related branches found
No related tags found
No related merge requests found
......@@ -149,7 +149,10 @@ def sign_message(message, wif, hashfn=hashlib.sha256):
if not isinstance(message, bytes_types):
message = py23_bytes(message, "utf-8")
digest = hashfn(message).digest()
if hashfn is not None:
digest = hashfn(message).digest()
else:
digest = message
priv_key = PrivateKey(wif)
if SECP256K1_MODULE == "secp256k1":
p = py23_bytes(priv_key)
......
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