def test_sig_verify(self): client = Client(None, ['demo_interface']) client.encryptor_set(client.interface, ['rotate', 41]) original = ['catamaran'] self.assertTrue( client.sig_verify(original, client.interface, client.sign(original)))
def test_sign(self): client = Client(None, ['demo_interface']) client.encryptor_set(client.interface, ['rotate', 41]) original = ['catamaran'] signature = client.sign(original) self.assertEqual( 'RawData((0x3a,0xa,0xe,0x3b,0x3c,0x39,0x10,0xe,0xf,0x3d,0x3a,0x38,0xb,0xc,0xd,0x8,0x7,0x39,0xf,0xf,0xc,0x39,0xe,0xe,0x8,0x3d,0x3a,0x38,0x3a,0x3a,0xb,0x10,0x39,0x3d,0xb,0x9,0xc,0x3a,0xa,0xb))', repr(signature))