Skip to content
Snippets Groups Projects
Commit eea43443 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

docs

parent bbc1fcf4
No related branches found
No related tags found
1 merge request!43Add some more docs
# Copyright 2019 PrivateStorage.io, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Common fixtures to let the test suite focus on application logic.
"""
from __future__ import ( from __future__ import (
absolute_import, absolute_import,
) )
......
# Copyright 2019 PrivateStorage.io, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Ristretto-flavored PrivacyPass helpers for the test suite.
"""
from __future__ import ( from __future__ import (
absolute_import, absolute_import,
) )
...@@ -8,6 +26,21 @@ from privacypass import ( ...@@ -8,6 +26,21 @@ from privacypass import (
) )
def make_passes(signing_key, for_message, random_tokens): def make_passes(signing_key, for_message, random_tokens):
"""
Create a number of cryptographically correct privacy passes.
:param privacypass.SigningKey signing_key: The key to use to sign the
passes.
:param unicode for_message: The request-binding message with which to
associate the passes.
:param list[privacypass.RandomToken] random_tokens: The random tokens to
feed in to the pass generation process.
:return list[unicode]: The privacy passes. The returned list has one
element for each element of ``random_tokens``.
"""
blinded_tokens = list( blinded_tokens = list(
token.blind() token.blind()
for token for token
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment