forked from Election-Tech-Initiative/electionguard-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproof.py
More file actions
24 lines (16 loc) · 600 Bytes
/
proof.py
File metadata and controls
24 lines (16 loc) · 600 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from enum import Enum
from .utils import space_between_capitals
class ProofUsage(Enum):
"""Usage case for proof"""
Unknown = "Unknown"
SecretValue = "Prove knowledge of secret value"
SelectionLimit = "Prove value within selection's limit"
SelectionValue = "Prove selection's value (0 or 1)"
class Proof:
"""Base class for proofs with name and usage case"""
name: str = "Proof"
usage: ProofUsage = ProofUsage.Unknown
def __init__(self) -> None:
object.__setattr__(
self, "name", space_between_capitals(self.__class__.__name__)
)