From ee1ae4f8618b90df3a580f550f2735a4cceb734e Mon Sep 17 00:00:00 2001 From: Riccardo Date: Wed, 25 Sep 2019 17:06:25 -0700 Subject: [PATCH] Better hash print --- crypto/sign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/sign.py b/crypto/sign.py index 6236739513ee0e..0f1ce030815b6d 100755 --- a/crypto/sign.py +++ b/crypto/sign.py @@ -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'))