Esempio n. 1
0
 def test_generate_key_pair(self):
     sk_b58, vk_b58 = ed25519_generate_key_pair()
     assert len(base58.b58decode(sk_b58)) == 32
     assert len(base58.b58decode(vk_b58)) == 32
     assert SigningKey.encode(SigningKey.decode(sk_b58)) == sk_b58
     assert VerifyingKey.encode(VerifyingKey.decode(vk_b58)) == vk_b58
Esempio n. 2
0
 def test_verifying_key_decode(self, vk_ilp):
     public_value = VerifyingKey.decode(vk_ilp['b58'])
     assert public_value == base64_add_padding(vk_ilp['b64'])