INNER CODE UNIT · Python

hexstr_to_intarray

BlockstreamResearch/secp256k1-zkp · tools/test_vectors_musig2_generate.py:17

def hexstr_to_intarray(str):
    return ", ".join([f"0x{b:02X}" for b in bytes.fromhex(str)])


def create_init(name):
    return """
static const struct musig_%s_vector musig_%s_vector = {
""" % (
        name,
        name,
    )


def init_array(key):
    return textwrap.indent("{ %s },\n" % hexstr_to_intarray(data[key]), 4 * " ")


def init_arrays(key):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…