Example #1
0
 def test_00_keypair(self):
     print("\n-----", sys._getframe().f_code.co_name, "-----")
     global keypair1
     kp = KeyPair(pubkey=keypair1.public_key)
     assert kp.public_key
Example #2
0
import pytest

import binascii
import sys
sys.path.extend(["../", "../../"])
from bbc1.core.compat.bbclib import BBcTransaction, BBcEvent, BBcReference, BBcWitness, BBcRelation, BBcAsset, \
    BBcCrossRef, KeyPair, KeyType
from bbc1.core.compat import bbclib

user_id = bbclib.get_new_id("user_id_test1")
user_id2 = bbclib.get_new_id("user_id_test2")
domain_id = bbclib.get_new_id("testdomain")
asset_group_id = bbclib.get_new_id("asset_group_1")
transaction1_id = bbclib.get_new_id("transaction_1")
transaction2_id = bbclib.get_new_id("transaction_2")
keypair1 = KeyPair()
keypair1.generate()
keypair2 = KeyPair()
keypair2.generate()

transaction1 = None
asset1 = None
asset2 = None
event1 = None
event2 = None
transaction2 = None
asset_content = b'abcdefg'

print("\n")
print("private_key:", binascii.b2a_hex(keypair1.private_key))
print("private_key(pem):\n", keypair1.get_private_key_in_pem())