Example #1
0
 def test_sign_verify_fail(self):
     data = b'abacate'
     p1 = PeerId()
     signature = p1.sign(data)
     signature = signature[::-1]
     self.assertFalse(p1.verify_signature(signature, data))
Example #2
0
 def test_sign_verify(self):
     data = b'abacate'
     p1 = PeerId()
     signature = p1.sign(data)
     self.assertTrue(p1.verify_signature(signature, data))