Nenhuma Descrição

decrypt.js 730B

123456789101112131415161718192021222324
  1. var publicKey ="042DBA45E7B03394F603CADAFCDDEC854D3E01A4E9C52CD799B85B1A14BDB970137AE58BA553D79F058604DC1CD4B77DE5408BA3308E767584100C2B663510C819";
  2. var privateKey ="BF1F907B4E0487F798DC80AFD7BC2A6201E8514233002272EA3BE2FC6F797843";
  3. //加密
  4. function encryptFn(value){
  5. var encrText = sm2.doEncrypt(value, publicKey);
  6. return encrText
  7. }
  8. //解密
  9. function decryptFn(value){
  10. var decryptText = sm2.doDecrypt(value.slice(2), privateKey,0);
  11. return decryptText
  12. }
  13. function phoneTableClick(ele,data){
  14. console.log(decryptFn(data))
  15. ele.innerText =decryptFn(data)
  16. }
  17. function addPhoneHtml(ele,data,dataShow){
  18. var html = '<a onclick="phoneTableClick(this ,\'' +row.CallNumberShow+'\')"> ' + val + '</a>'
  19. $(html).appendTo($(ele))
  20. }