#coding:utf-8
'''
Date 2021-04-19
'''
import json
import requests
import time
import md5
SECRET_KEY = "4514bba63c02648cd2c7bdbed2d9e103"
APPID = "4c63fa52e36a4c50b3f47077c763915e"
BIZID = "1199006120"
def headers_sign_encrypt(secret_key,headers,post_data):
"""
签名
"""
from Crypto.Hash import SHA256
verify_str = secret_key + ''.join(['%s%s' % (k,v) for k,v in sorted(headers.iteritems())]) + post_data
return SHA256.new(verify_str).hexdigest()
def aes_encrypt(secret_key,plaintext):
"""
加密
"""
import base64,os,json,binascii
from Crypto.Cipher import AES
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import algorithms, modes
from cryptography.hazmat.primitives.ciphers.base import Cipher
iv = os.urando
网络游戏防沉迷实名认证python2版本
最新推荐文章于 2021-06-28 16:15:25 发布