code: def getSHA1(self, token, timestamp, nonce, encrypt):
          
          try:
              sortlist = [token, timestamp, nonce, encrypt]
              sortlist.sort()
              sha = hashlib.sha1()
              sha.update("".join(sortlist))
              return WXBizMsgCrypt_OK, sha.hexdigest()
          except Exception:
              return WXBizMsgCrypt_ComputeSignature_Error, None
docs: 用SHA1算法生成安全签名
          @param token:  票据
          @param timestamp: 时间戳
          @param encrypt: 密文
          @param nonce: 随机字符串
          @return: 安全签名