aboutsummaryrefslogtreecommitdiff
path: root/tests/test-rsa.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-rsa.py')
-rw-r--r--tests/test-rsa.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-rsa.py b/tests/test-rsa.py
index 57c554d..d0538ed 100644
--- a/tests/test-rsa.py
+++ b/tests/test-rsa.py
@@ -78,8 +78,9 @@ def trailing_comma(item, sequence):
return "" if item == sequence[-1] else ","
def print_hex(name, value, comment):
+ value = hexlify(value).decode("ascii")
printlines("static const uint8_t {name}[] = {{ /* {comment}, {length:d} bytes */",
- wrapper.fill(", ".join("0x" + hexlify(v) for v in value)),
+ wrapper.fill(", ".join("0x" + value[i : i + 2] for i in range(0, len(value), 2)))
"}};", "",
name = name, comment = comment, length = len(value))