>>> check_sign("123456",dict(code=1,s='2',msg=u'中文',sign='33C9065427EECA3490C5642C99165145'))
        True

def check_sign(api_secret, msg):
    """
        >>> check_sign("123456",dict(code=1,s='2',msg=u'中文',sign='33C9065427EECA3490C5642C99165145'))
        True

    """
    if "sign" not in msg:
        return False
    sign = msg['sign']
    params = [utils.safestr(msg[k]) for k in msg if k != 'sign' and msg[k] is not None]
    local_sign = make_sign(api_secret, params)
    result = (sign == local_sign)
    if not result:
        logger.error("check_sign failure, sign:%s != local_sign:%s" %(sign,local_sign))
    return result