From 74e9300daf0b5537749d5bbe6500281ba19d6e88 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Mon, 8 Apr 2019 17:19:47 -0400 Subject: add python bindings for PK signing --- python/tests/pk_test.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'python/tests/pk_test.py') 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) -- cgit v1.2.3