aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/ec/signature.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/ec/signature.py')
-rw-r--r--pyecsca/ec/signature.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyecsca/ec/signature.py b/pyecsca/ec/signature.py
index d9b49f7..a65adbc 100644
--- a/pyecsca/ec/signature.py
+++ b/pyecsca/ec/signature.py
@@ -1,4 +1,4 @@
-"""This module provides an implementation of ECDSA (Elliptic Curve Digital Signature Algorithm)."""
+"""Provides an implementation of ECDSA (Elliptic Curve Digital Signature Algorithm)."""
import hashlib
from typing import Optional, Any
@@ -42,6 +42,9 @@ class SignatureResult:
return False
return self.r == other.r and self.s == other.s
+ def __hash__(self):
+ return hash((self.r, self.s)) + 11
+
def __str__(self):
return f"(r={self.r}, s={self.s})"