From 542add5b4802416902379ba94dc11e5894d7191e Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Wed, 18 Sep 2019 10:38:37 -0400 Subject: [PATCH] docstring --- src/_zkapauthorizer/tests/test_controller.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/_zkapauthorizer/tests/test_controller.py b/src/_zkapauthorizer/tests/test_controller.py index e7e7f92..fb7efcd 100644 --- a/src/_zkapauthorizer/tests/test_controller.py +++ b/src/_zkapauthorizer/tests/test_controller.py @@ -269,6 +269,25 @@ class RistrettoRedeemerTests(TestCase): def ristretto_verify(signing_key, message, marshaled_passes): + """ + Verify that the given passes were generated in a process that involved a + signature from the given signing key and using the given message. + + :param privacypass.SigningKey signing_key: A signing key which should have + signed some random blinded tokens earlier in the lifecycle of the + passes to verify. + + :param bytes message: Request binding data which is involved in the + generation of the passes to verify. + + :param list[bytes] marshaled_passes: The base64-encoded representation of + some passes to verify. XXX Actually it's a two-tuple. Do something + about that ... + + :return bool: ``True`` if and only if all of the passes represented by + ``marshaled_passes`` pass the Ristretto-defined verification for an + exchange using the given signing key and message. + """ servers_passes = list( ( TokenPreimage.decode_base64(token_preimage), -- GitLab