国密加密 sm4 sm2 java python golang下载
国密加密解密 sm4 sm2 的java python golang实现,java和python,golang的有一定区别,需要修改点东西才可以实现。
SM4Key = ran_str = ''.join(random.sample(string.ascii_letters + string.digits, 16))
timestamp = str(int(time.time()*1000))
SM4 = SM4()
secret = SM4.encryptSM4(SM4Key, APP_ID+'&'+APP_SECRET+'&'+timestamp)
print (secret)
sm2_crypt = sm2.CryptSM2(public_key=PUBLIC_KEY, private_key='',mode=1)
enc_data = sm2_crypt.encrypt(SM4Key.encode())
#sessionSecretKey前面要加上04
sessionSecretKey = '
, 相关下载链接:https://download.csdn.net/download/wcwangwc/85050750?utm_source=bbsseo