示例#1
0
文件: public.py 项目: RyanKung/klefki
def to_bytes(pub: ECG) -> str:
    return bytes([2 +
                  (pub.value[1].value % 2)]) + int_to_byte(pub.value[0].value)
示例#2
0
def msgsig_to_bytes(v, r, s):
    return chr(v), int_to_byte(r), int_to_byte(s)
示例#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)