1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
var asekey =EncryptedCommunicationMix().md5(str(header['timestamp']+header['nonce']+任意长度随机字母数字组合)) var pubkey = 模板渲染获得
var bodyData = {"username":"dout","fsdafsa","fdsafsd"}
var respons = {"key":"","value":""}
respons['value'] = AESEncrypt(asekey,bodyData)
RSArespons['key'] = RSAEncrypt(pubkey,asekey)
$.ajax({ url: "http://localhost/Register", type: 'post', async: true, contentType: "application/json", data: JSON.stringify(ePost), dataType: 'json', success: function (res) { console.info(res); var resp = eb.browserDecrypt(res); console.log(resp); }, error: function (xhr) { alert('出错了'); } });
|