Skip to content

Commit

Permalink
Merge branch 'develop' into feature/operations-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Aug 9, 2018
2 parents 7f3e059 + 86b099f commit 1b85fbe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions graphenebase/ecdsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,13 @@ def sign_message(message, wif, hashfn=hashlib.sha256):
if not cnt % 20:
log.info("Still searching for a canonical signature. Tried %d times already!" % cnt)
order = ecdsa.SECP256k1.order
signer = private_key.signer(ec.ECDSA(hashes.SHA256()))
signer.update(message)
sigder = signer.finalize()
# signer = private_key.signer(ec.ECDSA(hashes.SHA256()))
# signer.update(message)
# sigder = signer.finalize()
sigder = private_key.sign(
message,
ec.ECDSA(hashes.SHA256())
)
r, s = decode_dss_signature(sigder)
signature = ecdsa.util.sigencode_string(r, s, order)
# Make sure signature is canonical!
Expand Down

0 comments on commit 1b85fbe

Please sign in to comment.