summary refs log tree commit diff
path: root/synapse/handlers/identity.py
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-29 15:01:27 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-29 15:01:27 +0100
commitf7ececb0acca62d969c197df66f9864a49a75b78 (patch)
treec1254c69f384eb7d3559936f956aa21c7e85755d /synapse/handlers/identity.py
parentMerge pull request #5890 from matrix-org/rei/rss_inc3 (diff)
parentFix coverage in sytest and use plugins for buildkite (#5922) (diff)
downloadsynapse-f7ececb0acca62d969c197df66f9864a49a75b78.tar.xz
Merge branch 'develop' into rei/rss_target
Diffstat (limited to 'synapse/handlers/identity.py')
-rw-r--r--synapse/handlers/identity.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py
index d199521b58..97daca5fee 100644
--- a/synapse/handlers/identity.py
+++ b/synapse/handlers/identity.py
@@ -282,3 +282,16 @@ class IdentityHandler(BaseHandler):
         except HttpResponseException as e:
             logger.info("Proxied requestToken failed: %r", e)
             raise e.to_synapse_error()
+
+
+class LookupAlgorithm:
+    """
+    Supported hashing algorithms when performing a 3PID lookup.
+
+    SHA256 - Hashing an (address, medium, pepper) combo with sha256, then url-safe base64
+        encoding
+    NONE - Not performing any hashing. Simply sending an (address, medium) combo in plaintext
+    """
+
+    SHA256 = "sha256"
+    NONE = "none"