Skip to content

Commit 31b8984

Browse files
author
Bertrand256
committed
Removed response decoding and fixed initial type of 'encryptedOutputData' to bytes.
1 parent 7d1e89c commit 31b8984

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

btchip/btchip.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,9 @@ def signMessagePrepareV2(self, path, message):
415415
self.resolvePublicKeysInPath(path)
416416
result = {}
417417
offset = 0
418-
encryptedOutputData = ""
418+
encryptedOutputData = b""
419419
while (offset < len(message)):
420-
params = [];
420+
params = []
421421
if offset == 0:
422422
params.extend(donglePath)
423423
params.append((len(message) >> 8) & 0xff)
@@ -435,7 +435,7 @@ def signMessagePrepareV2(self, path, message):
435435
apdu.append(len(params))
436436
apdu.extend(params)
437437
response = self.dongle.exchange(bytearray(apdu))
438-
encryptedOutputData = encryptedOutputData + response[1 : 1 + response[0]].decode("ascii")
438+
encryptedOutputData = encryptedOutputData + response[1 : 1 + response[0]]
439439
offset += blockLength
440440
result['confirmationNeeded'] = response[1 + response[0]] != 0x00
441441
result['confirmationType'] = response[1 + response[0]]

0 commit comments

Comments
 (0)