Exemplo n.º 1
0
 def test_verify_failure(self):
     base_key = BaseKey()
     data = os.urandom(200)
     signature = base_key.sign(data)
     assert not base_key.verify(signature, data[::-1])
Exemplo n.º 2
0
 def test_verify_failure(self):
     base_key = BaseKey()
     signature = base_key.sign(PUBLIC_KEY_COMPRESSED)
     assert not base_key.verify(signature, PUBLIC_KEY_UNCOMPRESSED)
Exemplo n.º 3
0
 def test_verify_success(self):
     base_key = BaseKey()
     data = os.urandom(200)
     signature = base_key.sign(data)
     assert base_key.verify(signature, data)
Exemplo n.º 4
0
 def test_verify_success(self):
     base_key = BaseKey()
     signature = base_key.sign(PUBLIC_KEY_COMPRESSED)
     assert base_key.verify(signature, PUBLIC_KEY_COMPRESSED)