Skip to content

Commit

Permalink
Better hash print
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Sep 26, 2019
1 parent 0de9ef7 commit ee1ae4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
x = dat
dd = hashlib.sha1(dat).digest()

print("hash:", binascii.hexlify(dd))
print("hash:", str(binascii.hexlify(dd), "utf-8"))
dd = b"\x00\x01" + b"\xff"*0x69 + b"\x00" + dd
rsa_out = pow(int.from_bytes(dd, byteorder='big', signed=False), rsa.d, rsa.n)
sig = (hex(rsa_out)[2:].rjust(0x100, '0'))
Expand Down

0 comments on commit ee1ae4f

Please sign in to comment.