<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  //源码在下面给出了
    <script type="text/javascript" src="js/tripledes.js"></script>
  </head>
  <body></body>
  <script>
    var send_param = "id=" + 1 + "&noticeId=" + 1 + "&driverId=" + "2325";
    // 原数据
    console.log(send_param);
    var send_encrypt_param = encrypt(send_param);
    // 加密效果
    console.log(send_encrypt_param);
    var dec_res = decrypt(send_encrypt_param);
    // 解密效果
    console.log(dec_res);
  </script>
</html>

引用原文件

/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
var CryptoJS=CryptoJS||function(u,l){var d={},n=d.lib={},p=function(){},s=n.Base={extend:function(a){p.prototype=this;var c=new p;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
q=n.WordArray=s.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,m=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%)for(var t=;t<a;t++)c[f+t>>>]|=(m[t>>>]>>>-*(t%)&)<<-*((f+t)%);else if(<m.length)for(t=;t<a;t+=)c[f+t>>>]=m[t>>>];else c.push.apply(c,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>]&=<<
-*(c%);a.length=u.ceil(c/)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice();return a},random:function(a){for(var c=[],m=;m<a;m+=)c.push(*u.random()|);return new q.init(c,a)}}),w=d.enc={},v=w.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=;f<a;f++){var t=c[f>>>]>>>-*(f%)&;m.push((t>>>).toString());m.push((t&).toString())}return m.join("")},parse:function(a){for(var c=a.length,m=[],f=;f<c;f+=)m[f>>>]|=parseInt(a.substr(f,
),)<<-*(f%);return new q.init(m,c/)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=;f<a;f++)m.push(String.fromCharCode(c[f>>>]>>>-*(f%)&));return m.join("")},parse:function(a){for(var c=a.length,m=[],f=;f<c;f++)m[f>>>]|=(a.charCodeAt(f)&)<<-*(f%);return new q.init(m,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}},
r=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new q.init;this._nDataBytes=},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,m=c.words,f=c.sigBytes,t=this.blockSize,b=f/(*t),b=a?u.ceil(b):u.max((b|)-this._minBufferSize,);a=b*t;f=u.min(*a,f);if(a){for(var e=;e<a;e+=t)this._doProcessBlock(m,e);e=m.splice(,a);c.sigBytes-=f}return new q.init(e,f)},clone:function(){var a=s.clone.call(this);
a._data=this._data.clone();return a},_minBufferSize:});n.Hasher=r.extend({cfg:s.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){r.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:,_createHelper:function(a){return function(c,m){return(new a.init(m)).finalize(c)}},_createHmacHelper:function(a){return function(c,m){return(new e.HMAC.init(a,
m)).finalize(c)}}});var e=d.algo={};return d}(Math);
(function () {
var u = CryptoJS, l = u.lib.WordArray; u.enc.Base64 = { stringify: function (d) { var n = d.words, l = d.sigBytes, s = this._map; d.clamp(); d = []; for (var q = ; q < l; q += )for (var w = (n[q >>> ] >>> - * (q % ) & ) << | (n[q + >>> ] >>> - * ((q + ) % ) & ) << | n[q + >>> ] >>> - * ((q + ) % ) & , v = ; > v && q + 0.75 * v < l; v++)d.push(s.charAt(w >>> * ( - v) & )); if (n = s.charAt()) for (; d.length % ;)d.push(n); return d.join("") }, parse: function (d) {
var n = d.length, p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=p.charAt();s&&(s=d.indexOf(s),-!=s&&(n=s));for(var s=[],q=,w=;w<
n;w++)if(w%){var v=p.indexOf(d.charAt(w-))<<*(w%),b=p.indexOf(d.charAt(w))>>>-*(w%);s[q>>>]|=(v|b)<<-*(q%);q++}return l.create(s,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
(function(u){function l(b,e,a,c,m,f,t){b=b+(e&a|~e&c)+m+t;return(b<<f|b>>>-f)+e}function d(b,e,a,c,m,f,t){b=b+(e&c|a&~c)+m+t;return(b<<f|b>>>-f)+e}function n(b,e,a,c,m,f,t){b=b+(e^a^c)+m+t;return(b<<f|b>>>-f)+e}function p(b,e,a,c,m,f,t){b=b+(a^(e|~c))+m+t;return(b<<f|b>>>-f)+e}for(var s=CryptoJS,q=s.lib,w=q.WordArray,v=q.Hasher,q=s.algo,b=[],x=;>x;x++)b[x]=*u.abs(u.sin(x+))|;q=q.MD5=v.extend({_doReset:function(){this._hash=new w.init([,,,])},
_doProcessBlock:function(r,e){for(var a=;>a;a++){var c=e+a,m=r[c];r[c]=(m<<|m>>>)&|(m<<|m>>>)&}var a=this._hash.words,c=r[e+],m=r[e+],f=r[e+],t=r[e+],y=r[e+],q=r[e+],s=r[e+],w=r[e+],v=r[e+],u=r[e+],x=r[e+],z=r[e+],A=r[e+],B=r[e+],C=r[e+],D=r[e+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A,,b[]),k=p(k,g,h,j,t,,b[]),j=p(j,k,g,h,x,,b[]),h=p(h,j,k,g,m,,b[]),g=p(g,h,j,k,v,,b[]),k=p(k,g,h,j,D,,b[]),j=p(j,k,g,h,s,,b[]),h=p(h,j,k,g,B,,b[]),g=p(g,h,j,k,y,,b[]),k=p(k,g,h,j,z,,b[]),j=p(j,k,g,h,f,,b[]),h=p(h,j,k,g,u,,b[]);a[]=a[]+g|;a[]=a[]+h|;a[]=a[]+j|;a[]=a[]+k|},_doFinalize:function(){var b=this._data,e=b.words,a=*this._nDataBytes,c=*b.sigBytes;e[c>>>]|=<<-c%;var m=u.floor(a/
);e[(c+>>><<)+]=(m<<|m>>>)&|(m<<|m>>>)&;e[(c+>>><<)+]=(a<<|a>>>)&|(a<<|a>>>)&;b.sigBytes=*(e.length+);this._process();b=this._hash;e=b.words;for(a=;>a;a++)c=e[a],e[a]=(c<<|c>>>)&|(c<<|c>>>)&;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});s.MD5=v._createHelper(q);s.HmacMD5=v._createHmacHelper(q)})(Math);
(function(){var u=CryptoJS,l=u.lib,d=l.Base,n=l.WordArray,l=u.algo,p=l.EvpKDF=d.extend({cfg:d.extend({keySize:,hasher:l.MD5,iterations:}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var p=this.cfg,v=p.hasher.create(),b=n.create(),u=b.words,r=p.keySize,p=p.iterations;u.length<r;){e&&v.update(e);var e=v.update(d).finalize(l);v.reset();for(var a=;a<p;a++)e=v.finalize(e),v.reset();b.concat(e)}b.sigBytes=*r;return b}});u.EvpKDF=function(d,l,n){return p.create(n).compute(d,
l)}})();
CryptoJS.lib.Cipher||function(u){var l=CryptoJS,d=l.lib,n=d.Base,p=d.WordArray,s=d.BufferedBlockAlgorithm,q=l.enc.Base64,w=l.algo.EvpKDF,v=d.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(m,a){return this.create(this._ENC_XFORM_MODE,m,a)},createDecryptor:function(m,a){return this.create(this._DEC_XFORM_MODE,m,a)},init:function(m,a,b){this.cfg=this.cfg.extend(b);this._xformMode=m;this._key=a;this.reset()},reset:function(){s.reset.call(this);this._doReset()},process:function(a){this._append(a);return this._process()},
finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:,ivSize:,_ENC_XFORM_MODE:,_DEC_XFORM_MODE:,_createHelper:function(m){return{encrypt:function(f,b,e){return("string"==typeof b?c:a).encrypt(m,f,b,e)},decrypt:function(f,b,e){return("string"==typeof b?c:a).decrypt(m,f,b,e)}}}});d.StreamCipher=v.extend({_doFinalize:function(){return this._process(!)},blockSize:});var b=l.mode={},x=function(a,f,b){var c=this._iv;c?this._iv=u:c=this._prevBlock;for(var e=;e<b;e++)a[f+e]^=
c[e]},r=(d.BlockCipherMode=n.extend({createEncryptor:function(a,f){return this.Encryptor.create(a,f)},createDecryptor:function(a,f){return this.Decryptor.create(a,f)},init:function(a,f){this._cipher=a;this._iv=f}})).extend();r.Encryptor=r.extend({processBlock:function(a,f){var b=this._cipher,c=b.blockSize;x.call(this,a,f,c);b.encryptBlock(a,f);this._prevBlock=a.slice(f,f+c)}});r.Decryptor=r.extend({processBlock:function(a,b){var c=this._cipher,e=c.blockSize,d=a.slice(b,b+e);c.decryptBlock(a,b);x.call(this,
a,b,e);this._prevBlock=d}});b=b.CBC=r;r=(l.pad={}).Pkcs7={pad:function(a,b){for(var c=*b,c=c-a.sigBytes%c,e=c<<|c<<|c<<|c,d=[],l=;l<c;l+=)d.push(e);c=p.create(d,c);a.concat(c)},unpad:function(a){a.sigBytes-=a.words[a.sigBytes->>>]&}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:r}),reset:function(){v.reset.call(this);var a=this.cfg,c=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var b=a.createEncryptor;else b=a.createDecryptor,this._minBufferSize=;this._mode=b.call(a,
this,c&&c.words)},_doProcessBlock:function(a,c){this._mode.processBlock(a,c)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var c=this._process(!)}else c=this._process(!),a.unpad(c);return c},blockSize:});var e=d.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(l.format={}).OpenSSL={stringify:function(a){var c=a.ciphertext;a=a.salt;return(a?p.create([,
]).concat(a).concat(c):c).toString(q)},parse:function(a){a=q.parse(a);var c=a.words;if(==c[]&&==c[]){var b=p.create(c.slice(,));c.splice(,);a.sigBytes-=}return e.create({ciphertext:a,salt:b})}},a=d.SerializableCipher=n.extend({cfg:n.extend({format:b}),encrypt:function(a,c,b,d){d=this.cfg.extend(d);var l=a.createEncryptor(b,d);c=l.finalize(c);l=l.cfg;return e.create({ciphertext:c,key:b,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},
decrypt:function(a,c,b,e){e=this.cfg.extend(e);c=this._parse(c,e.format);return a.createDecryptor(b,e).finalize(c.ciphertext)},_parse:function(a,c){return"string"==typeof a?c.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,c,b,d){d||(d=p.random());a=w.create({keySize:c+b}).compute(a,d);b=p.create(a.words.slice(c),*b);a.sigBytes=*c;return e.create({key:a,iv:b,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:l}),encrypt:function(c,b,e,d){d=this.cfg.extend(d);e=d.kdf.execute(e,
c.keySize,c.ivSize);d.iv=e.iv;c=a.encrypt.call(this,c,b,e.key,d);c.mixIn(e);return c},decrypt:function(c,b,e,d){d=this.cfg.extend(d);b=this._parse(b,d.format);e=d.kdf.execute(e,c.keySize,c.ivSize,b.salt);d.iv=e.iv;return a.decrypt.call(this,c,b,e.key,d)}})}();
(function(){function u(b,a){var c=(this._lBlock>>>b^this._rBlock)&a;this._rBlock^=c;this._lBlock^=c<<b}function l(b,a){var c=(this._rBlock>>>b^this._lBlock)&a;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:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,
:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:},{"":,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,
:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,
:,:,:,:,:,:}],x=[,,,,,,,],r=s.DES=n.extend({_doReset:function(){for(var b=this._key.words,a=[],c=;>c;c++){var d=q[c]-;a[c]=b[d>>>]>>>-d%&}b=this._subKeys=[];for(d=;>d;d++){for(var f=b[d]=[],l=v[d],c=;>c;c++)f[c/|]|=a[(w[c]-+l)%]<<-c%,f[+(c/|)]|=a[+(w[c+]-+l)%]<<-c%;f[]=f[]<<|f[]>>>;for(c=;>c;c++)f[c]>>>=
*(c-)+;f[]=f[]<<|f[]>>>}a=this._invSubKeys=[];for(c=;>c;c++)a[c]=b[-c]},encryptBlock:function(b,a){this._doCryptBlock(b,a,this._subKeys)},decryptBlock:function(b,a){this._doCryptBlock(b,a,this._invSubKeys)},_doCryptBlock:function(e,a,c){this._lBlock=e[a];this._rBlock=e[a+];u.call(this,,);u.call(this,,);l.call(this,,);l.call(this,,);u.call(this,,);for(var d=;>d;d++){for(var f=c[d],n=this._lBlock,p=this._rBlock,q=,r=;>r;r++)q|=b[r][((p^
f[r])&x[r])>>>];this._lBlock=p;this._rBlock=n^q}c=this._lBlock;this._lBlock=this._rBlock;this._rBlock=c;u.call(this,,);l.call(this,,);l.call(this,,);u.call(this,,);u.call(this,,);e[a]=this._lBlock;e[a+]=this._rBlock},keySize:,ivSize:,blockSize:});d.DES=n._createHelper(r);s=s.TripleDES=n.extend({_doReset:function(){var b=this._key.words;this._des1=r.createEncryptor(p.create(b.slice(,)));this._des2=r.createEncryptor(p.create(b.slice(,)));this._des3=
r.createEncryptor(p.create(b.slice(,)))},encryptBlock:function(b,a){this._des1.encryptBlock(b,a);this._des2.decryptBlock(b,a);this._des3.encryptBlock(b,a)},decryptBlock:function(b,a){this._des3.decryptBlock(b,a);this._des2.encryptBlock(b,a);this._des1.decryptBlock(b,a)},keySize:,ivSize:,blockSize:});d.TripleDES=n._createHelper(s)})();
function encrypt(message){
var key = "m.XiaoMachUxing.cn/CnCX!";
var iv = "JkgNuiK@";
var keyHex = CryptoJS.enc.Utf8.parse(key);
var ivHex = CryptoJS.enc.Utf8.parse(iv);
var encrypted = CryptoJS.TripleDES.encrypt(message, keyHex, {
iv: ivHex,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
}
);
return encrypted.toString();
}
function decrypt(abc) {
var key = 'm.XiaoMachUxing.cn/CnCX!';
var iv = "JkgNuiK@";
var keyHex = CryptoJS.enc.Utf8.parse(key);
var decrypted = CryptoJS.TripleDES.decrypt({
ciphertext: CryptoJS.enc.Base64.parse(abc)
}, keyHex, {
iv: CryptoJS.enc.Utf8.parse('JkgNuiK@'),
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
});
return decrypted.toString(CryptoJS.enc.Utf8);
}
//module.exports = {
// keys:CryptoJS.enc.Utf8.parse,
// encrypts:CryptoJS.TripleDES.encrypt,
// cbcs:CryptoJS.mode.CBC,
// Pkcs7s:CryptoJS.pad.Pkcs7,
// decrypts:CryptoJS.TripleDES.decrypt,
// Base64s:CryptoJS.enc.Base64.parse,
// Utf8s:CryptoJS.enc.Utf8
//
//
//
//
//}

js 加密解密 TripleDES的更多相关文章

  1. js中对arry数组的各种操作小结 瀑布流AJAX无刷新加载数据列表--当页面滚动到Id时再继续加载数据 web前端url传递值 js加密解密 HTML中让表单input等文本框为只读不可编辑的方法 js监听用户的键盘敲击事件,兼容各大主流浏览器 HTML特殊字符

    js中对arry数组的各种操作小结   最近工作比较轻松,于是就花时间从头到尾的对js进行了详细的学习和复习,在看书的过程中,发现自己平时在做项目的过程中有很多地方想得不过全面,写的不够合理,所以说啊 ...

  2. 关于HTML或JS加密解密的七种方式

    本文一共介绍了七种方法:   一:最简单的加密解密   二:转义字符""的妙用   三:使用Microsoft出品的脚本编码器Script Encoder来进行编码    (自创简 ...

  3. JAVASCRIPT加密方法,JS加密解密综述(7种)

    一:最简单的加密解密 对于JAVASCRIPT函数escape()和unescape()想必是比较了解啦(很多网页加密在用它们),分别是编码和解码字符串,比如例子代码 用escape()函数加密后变为 ...

  4. js加密解密 base64

    <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title> ...

  5. 关于js加密解密

    有的时候有些网站的js用简单的eval混淆加密了.解密其实很简单的 解密JS的eval加密码的方式例如这段: 很多朋友以为这段代码是“加密”的,其实这也谈不上是加密,只能算是一种编码(Encode)或 ...

  6. web前端url传递值 js加密解密

    一:Js的Url中传递中文参数乱码问题,重点:encodeURI编码,decodeURI解码: 1.传参页面Javascript代码: <script type=”text/javascript ...

  7. RSA JS 加密解密DEMO

    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script&g ...

  8. js加密解密

    <script> document.write("<xmp>"); document.write(function(p,a,c,k,e,r){}(''.sp ...

  9. js加密后台加密解密以及验证码

    该文档为转载内容: 加密解密 1 前端js加密概述 2 前后端加密解密 21 引用的js加密库 22 js加密解密 23 Java端加密解密PKCS5Padding与js的Pkcs7一致 验证码 1 ...

随机推荐

  1. INI文件,WritePrivateProfileString()和GetPrivateProfileString()函数----转载

    INI文件就是扩展名为“ini”的文件.在Windows系统中,INI文件是很多,最重要的就是“System.ini”.“System32.ini”和“Win.ini”.该文件主要存放用户所做的选择以 ...

  2. python join 和setDaemon 简介

    Python多线程编程时,经常会用到join()和setDaemon()方法 1.join ()方法:主线程A中,创建了子线程B,并且在主线程A中调用了B.join(),那么,主线程A会在调用的地方等 ...

  3. Linux centosVMware 命令 lvm、磁盘故障小案例

    一.lvm命令 LVM:逻辑分区管理,可基于动态的扩展缩小硬件设备的使用空间,注意:lvm磁盘复杂,由于使用lvm,数据丢失恢复起来有一定风险.概念:pv.VG.lvpv(物理卷,有pp基本单位构成) ...

  4. modelsim10.4环境变量的设置

    在用户变量中设置,注意路径还要包括license.txt 点击高级属性设置 点击环境变量 在用户变量一件名为:MGLS_LICENSE_FILE的变量 点击确定

  5. Day9 - F - Monkey and Banana HDU - 1069

    一组研究人员正在设计一项实验,以测试猴子的智商.他们将挂香蕉在建筑物的屋顶,同时,提供一些砖块给这些猴子.如果猴子足够聪明,它应当能够通过合理的放置一些砖块建立一个塔,并爬上去吃他们最喜欢的香蕉.   ...

  6. 【高软作业2】:Java IDE调研分析

    一 序言 随着软件项目开发需求的增多,拥有一款优秀的.顺手的IDE(Integrated Development Environment)对程序员来说显得格外重要.本文就Java程序开发,选择了3款I ...

  7. 全程2分钟!教你如何免费下载Windows 10

    全程2分钟!教你如何免费下载Windows 10 2014-10-02 08:40:59  来源:pconline 原创  作者:唐山居人  责任编辑:caoweiye  (评论314条)   终于在 ...

  8. HDU 1024:Max Sum Plus Plus 经典动态规划之最大M子段和

    Max Sum Plus Plus Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  9. Java8 使用LocalDate计算两个日期间隔多少年,多少月,多少天

    最近项目遇到一个需要计算两个日期间隔的期限,需要计算出,整年整月整日这样符合日常习惯的说法,利用之前的Date和Calendar类会有点复杂,刚好项目使用了JDK8,那就利用起来这个新特性,上代码: ...

  10. 多个Activity跳转的小结

    第一个例子:demo1 Main—>SecondActivity—>Main 从流程上看就是从Main跳转到SecondActivity,再从SecondActivity返回到Main.也 ...