1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

further shorten short session ID

This commit is contained in:
Seth Schoen
2012-11-18 22:28:16 -08:00
parent f67b5656f6
commit 97ea1082ef

View File

@@ -15,10 +15,10 @@ def signal_handler(a, b):
r.lpush("exit", "clean-exit")
def short(session):
"""Return the first 12 bytes of a session ID, or, for a
"""Return the first 8 bytes of a session ID, or, for a
challenge ID, the challenge ID with the session ID truncated."""
tmp = session.partition(":")
return tmp[0][:12] + "..." + tmp[1] + tmp[2]
return tmp[0][:8] + ".." + tmp[1] + tmp[2]
def random():
"""Return 64 hex digits representing a new 32-byte random number."""