def make_hash(*args): if len(args) <= 0: return None s = _sha() for arg in args: s.update(to_str(arg)) return _hex(s.digest())
def _wsse_username_token(cnonce, iso_now, password): return base64.b64encode(_sha(("%s%s%s" % (cnonce, iso_now, password)).encode('utf-8')).digest()).strip()
def _wsse_username_token(cnonce, iso_now, password): return base64.encodestring(_sha("%s%s%s" % (cnonce, iso_now, password)).digest()).strip()