Example #1
0
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 ''
Example #2
0
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 ''
Example #3
0
def build_mysign(prestr, key=None, sign_type='MD5'):
    if sign_type == 'MD5':
        prestr += '&key=%s' % str(key)
        return md5(prestr).hexdigest().upper()
    return ''