From 407c9a2975f9664050cc2c95e7b759da183345d7 Mon Sep 17 00:00:00 2001 From: Alexander Cherniuk Date: Thu, 25 Feb 2010 13:10:35 +0200 Subject: [PATCH] Tiny fixups for the SCRAM-SHA-1 --- src/common/xmpp/auth_nb.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/xmpp/auth_nb.py b/src/common/xmpp/auth_nb.py index 39f0ffe58..d0e615d1d 100644 --- a/src/common/xmpp/auth_nb.py +++ b/src/common/xmpp/auth_nb.py @@ -116,8 +116,7 @@ def challenge_splitter(data): return dict_ def scram_parse(chatter): - stuff = dict(s.split('=', 1) for s in chatter.split(',')) - return stuff + return dict(s.split('=', 1) for s in chatter.split(',')) class SASL(PlugIn): """ @@ -334,7 +333,7 @@ class SASL(PlugIn): return hmac.HMAC(key=k, msg=s, digestmod=hashfn).digest() def XOR(x, y): - r = [chr(ord(px) ^ ord(py)) for px, py in zip(x, y)] + r = (chr(ord(px) ^ ord(py)) for px, py in zip(x, y)) return ''.join(r) def Hi(s, salt, iters):