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 From ab6e8d5086894ae73c33b124a0c04df4b0195a46 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Fri, 12 Apr 2019 19:17:06 -0400 Subject: more isort --- python/tests/pk_test.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'python/tests/pk_test.py') diff --git a/python/tests/pk_test.py b/python/tests/pk_test.py index 096b6a8..fe3b4b6 100644 --- a/python/tests/pk_test.py +++ b/python/tests/pk_test.py @@ -1,12 +1,7 @@ import pytest -from olm import ( - ed25519_verify, - PkDecryption, - PkDecryptionError, - PkEncryption, - PkSigning -) +from olm import (PkDecryption, PkDecryptionError, PkEncryption, PkSigning, + ed25519_verify) class TestClass(object): -- cgit v1.2.3