aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/utils/security.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/utils/security.py b/src/utils/security.py
index 1c8f2cf4..78a54b5c 100644
--- a/src/utils/security.py
+++ b/src/utils/security.py
@@ -22,7 +22,5 @@ def ssl_wrap(sock: socket.socket, cert: str=None, key: str=None,
return context.wrap_socket(sock, server_side=server_side,
server_hostname=hostname)
-def constant_time_compare(
- a: typing.Union[str, bytes],
- b: typing.Union[str, bytes]) -> bool:
+def constant_time_compare(a: typing.AnyStr, b: typing.AnyStr) -> bool:
return hmac.compare_digest(a, b)