code: def check_signature(self, signature, timestamp, nonce):
          
          if not signature or not timestamp or not nonce:
              return False
  
          tmp_list = [self.conf.token, timestamp, nonce]
          tmp_list.sort()
          tmp_str = ''.join(tmp_list)
          if signature != hashlib.sha1(tmp_str.encode('utf-8')).hexdigest():
              return False
  
          return True
docs: 验证微信消息真实性
          :param signature: 微信加密签名
          :param timestamp: 时间戳
          :param nonce: 随机数
          :return: 通过验证返回 True, 未通过验证返回 False