aboutsummaryrefslogtreecommitdiffstats
path: root/src/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/python')
-rwxr-xr-xsrc/python/botan2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/botan2.py b/src/python/botan2.py
index b0b2856ec..66e7b9633 100755
--- a/src/python/botan2.py
+++ b/src/python/botan2.py
@@ -1415,6 +1415,9 @@ class MPI(object):
_DLL.botan_mp_cmp(byref(r), self.__obj, other.handle_())
return r.value
+ def __hash__(self):
+ return hash(to_bytes())
+
def __eq__(self, other):
return self.cmp(other) == 0