资源简介
生意参谋接口加密请求参数transit-id,接口响应data数据解密,python源码,跟生意参谋后台同步更新
代码片段和文件信息
import rsa
from Crypto.Cipher import AES
import base64
from binascii import a2b_hex
def get_transit_id():
“““
获取transit_id
:return: transit_id
“““
# vendors.js PUBLICKEY
pubkey = rsa.PublicKey.load_pkcs1_openssl_pem(“-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJ50kaClQ5XTQfzkHAW9Ehi+iXQKUwVWg1R0SC3uYIlVmneu6AfVPEj6ovMmHa2ucq0qCUlMK+ACUPejzMZbcRAMtDAM+o0XYujcGxJpcc6jHhZGO0QSRK37+i47RbCxcdsUZUB5AS0BAIQOTfRW8XUrrGzmZWtiypu/97lKVpeQIDAQAB\n-----END PUBLIC KEY-----\n“)
crypto =
评论
共有 条评论