diff options
Diffstat (limited to 'tests/test-ecdsa.py')
-rw-r--r-- | tests/test-ecdsa.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-ecdsa.py b/tests/test-ecdsa.py index cf21019..4c14d9f 100644 --- a/tests/test-ecdsa.py +++ b/tests/test-ecdsa.py @@ -126,9 +126,10 @@ for curve in curves: if isinstance(value, int): value = long_to_bytes(value, order) if value is not None: + value = hexlify(value).decode("ascii") print() print("static const uint8_t {}[] = {{ /* {:d} bytes */".format(name, len(value))) - print(wrapper.fill(", ".join("0x" + hexlify(v) for v in value))) + print(wrapper.fill(", ".join("0x" + value[i : i + 2] for i in range(0, len(value), 2)))) print("};") print() |