Обновить py/converter.py

This commit is contained in:
artemuhi 2024-03-23 14:48:09 +03:00
parent 09ed6a9476
commit ec8414d2a5

View File

@ -44,10 +44,10 @@ def p2h(data, keymode):
def h2p(data, keymode): def h2p(data, keymode):
if(keymode=="sk"): if(keymode=="sk"):
sk = SigningKey.from_string(b16decode(data.upper().encode()), curve=SECP256k1) sk = SigningKey.from_string(b16decode(data.upper().encode()), curve=SECP256k1)
print(sk.to_pem().decode()) print(decode(vk.to_pem()))
elif(keymode=="vk"): elif(keymode=="vk"):
vk = VerifyingKey.from_string(b16decode(data.upper().encode()), curve=SECP256k1) vk = VerifyingKey.from_string(b16decode(data.upper().encode()), curve=SECP256k1)
print(vk.to_pem().decode()) print(decode(vk.to_pem()))
def seed2hkey(data, keymode): def seed2hkey(data, keymode):
seed = PRNG(data.encode()) seed = PRNG(data.encode())