aboutsummaryrefslogtreecommitdiff
path: root/python/tests/pk_test.py
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-04-08 17:19:47 -0400
committerHubert Chathi <hubert@uhoreg.ca>2019-04-08 17:19:47 -0400
commit74e9300daf0b5537749d5bbe6500281ba19d6e88 (patch)
tree4a1d2645268b2c2ed7294d4892e7724fa04d68d8 /python/tests/pk_test.py
parentebc156e7c272e08e375c3e704651b179541e078b (diff)
add python bindings for PK signing
Diffstat (limited to 'python/tests/pk_test.py')
-rw-r--r--python/tests/pk_test.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/python/tests/pk_test.py b/python/tests/pk_test.py
index f2aa147..096b6a8 100644
--- a/python/tests/pk_test.py
+++ b/python/tests/pk_test.py
@@ -1,6 +1,12 @@
import pytest
-from olm import PkDecryption, PkDecryptionError, PkEncryption
+from olm import (
+ ed25519_verify,
+ PkDecryption,
+ PkDecryptionError,
+ PkEncryption,
+ PkSigning
+)
class TestClass(object):
@@ -47,3 +53,10 @@ class TestClass(object):
with pytest.raises(PkDecryptionError):
PkDecryption.from_pickle(pickle, "Not secret")
+
+ def test_signing(self):
+ seed = PkSigning.generate_seed()
+ signing = PkSigning(seed)
+ message = "This statement is true"
+ signature = signing.sign(message)
+ ed25519_verify(signing.public_key, message, signature)