def build_mysign(prestr, key=None, sign_type='MD5'): if sign_type == 'MD5': prestr += '&key=%s' % str(key) if six.PY3: prestr = prestr.encode("utf8") return md5(prestr).hexdigest().upper() return ''
def build_mysign(prestr, key=None, sign_type='MD5'): if sign_type == 'MD5': prestr += '&key=%s' % str(key) return md5(prestr).hexdigest().upper() return ''