Ejemplo n.º 1
0
def to_bytes(pub: ECG) -> str:
    return bytes([2 +
                  (pub.value[1].value % 2)]) + int_to_byte(pub.value[0].value)
Ejemplo n.º 2
0
def msgsig_to_bytes(v, r, s):
    return chr(v), int_to_byte(r), int_to_byte(s)
Ejemplo n.º 3
0
def gen_address(pub: ECG) -> str:
    x = int_to_byte(pub.value[0].value)
    y = int_to_byte(pub.value[1].value)
    return gen_address_from_bytes(x + y)