Commit cb8af6a3 by mushishixian

发布包文件

parent 0c0bdc8d
<?php
return [
# 是否开启iframe_tab
'enable' => env('START_IFRAME_TAB', true),
# 底部设置
'footer_setting' => [
'copyright' => env('APP_NAME', ''),
'app_version' => env('APP_VERSION', ''),
# 是否将底部置于菜单下
'use_menu' => false
],
# 是否开启标签页缓存
'cache' => env('IFRAME_TAB_CACHE', false),
# 更改dialog表单默认宽高
'dialog_area_width' => env('IFRAME_TAB_DIALOG_AREA_WIDTH', '50%'),
'dialog_area_height' => env('IFRAME_TAB_DIALOG_AREA_HEIGHT', '90vh'),
# iframe-tab占用的路由 默认 '/'
'router' => '/',
# iframe-tab域名(一般用于多应用后台)
'domain' => null,
# 是否开启懒加载模式
'lazy_load' => true
];
.iframe-tab-container {
position: absolute;
top: 60px;
width: calc(100% - 260px);
max-width: 100%;
height: 40px;
background: #ffffff;
border-top: 1px solid #e2e2e2;
box-sizing: border-box;
min-height: 20px;
z-index: 1;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
}
.iframe-tab-container + .iframe-tab-wrapper {
padding: 100px 0 0 0;
top: 0;
height: calc(100vh - 100px);
min-height: 900px;
}
/*其他布局*/
.iframe-tab-sidebar-separate {
width: calc(100% - 280px - 6rem);
top: 6rem;
}
.iframe-tab-sidebar-separate + .iframe-tab-wrapper {
padding: calc(6rem + 40px) 0 0 0;
}
.header-navbar.navbar-shadow {
box-shadow: none;
}
.header-navbar.navbar-shadow {
box-shadow: none;
}
@media (min-width: 992px) {
.sidebar-mini.sidebar-collapse .iframe-tab-container {
margin-left: 5.4rem !important;
width: calc(100% - 5.4rem);
/*transition: width .3s ease-in-out;*/
}
.sidebar-mini.sidebar-collapse .iframe-tab-sidebar-separate {
margin-left: calc(6rem + 35px) !important;
width: calc(100% - 6rem - 35px - 40px);
/*transition: width .3s ease-in-out;*/
}
}
@media (min-width: 768px) {
body:not(.sidebar-mini-md) .iframe-tab-container {
margin-left: 260px;
transition: margin-left .3s ease-in-out;
}
body:not(.sidebar-mini-md) .iframe-tab-sidebar-separate {
margin-left: calc(280px + 3rem);
transition: margin-left .3s ease-in-out;
}
}
@media (max-width: 991px) {
body:not(.sidebar-mini-md) .iframe-tab-container, body:not(.sidebar-mini-md) .iframe-tab-container:before {
width: 100%;
margin-left: 0;
}
body:not(.sidebar-mini-md) .iframe-tab-sidebar-separate, body:not(.sidebar-mini-md) .iframe-tab-sidebar-separate:before {
width: calc(100% - 80px);
margin-left: 40px;
}
.iframe-tab-sidebar-separate {
margin-left: 20px;
width: calc(100% - 80px);
}
body:not(.sidebar-mini-md) .content-wrapper {
transition: margin-left .3s ease-in-out;
margin-left: 0;
}
}
#iframe-tab-container #iframe-tab .nav-link {
padding: 0 30px;
box-sizing: border-box;
line-height: 40px;
height: 40px;
border-radius: 0;
position: relative;
border-right: 1px solid #efefef;
margin-right: 0;
}
#iframe-tab-container #iframe-tab .nav-link p, #iframe-tab-container #iframe-tab .nav-link span:not(.iframe-tab-close-btn) {
display: inline;
}
.iframe-tab-close-btn {
display: none;
}
/*#iframe-tab-container #iframe-tab .nav-link.active .iframe-tab-close-btn,*/
#iframe-tab-container #iframe-tab .nav-link:hover .iframe-tab-close-btn {
position: absolute;
top: -1px;
right: 7px;
display: block;
z-index: 999;
}
#iframe-tab-container #iframe-tab .nav-link.active .iframe-tab-close-btn i {
color: white;
font-size: 12px;
transition: margin-left .3s ease-in-out;
}
#iframe-tab-container #iframe-tab .nav-link:hover .iframe-tab-close-btn {
color: #414750;
font-weight: lighter;
}
#iframe-tab {
width: 100%;
position: relative;
flex-wrap: nowrap;
}
/*右键菜单*/
.mouse-click-menu {
background-color: rgba(0, 0, 0, 0.8);
-moz-box-shadow: 2px 2px 5px #666;
-webkit-box-shadow: 2px 2px 5px #666;
box-shadow: 2px 2px 5px #666;
position: fixed;
width: 120px;
box-sizing: border-box;
border-radius: 0.5rem;
display: none;
z-index: 99999;
padding: 5px 0;
}
.mouse-click-menu ul {
width: 100%;
display: block;
padding: 5px 0;
}
.mouse-click-menu ul li {
display: block;
width: 100%;
list-style: none;
}
.mouse-click-menu .li_separate {
line-height: 0;
margin: 3px;
border-bottom: 1px solid #727575;
font-size: 0;
}
.mouse-click-menu .menu-item {
width: 100%;
display: block;
height: 25px;
line-height: 24px;
color: white;
font-size: 12px;
text-decoration: none;
text-align: center;
}
.mouse-click-menu .menu-item:hover {
background: white;
color: black;
}
.swiper-button-prev i, .swiper-button-next i {
color: #555555;
font-size: 20px;
}
.swiper-button-prev {
width: 40px;
height: 40px;
background: #efefef;
left: 0;
border: none;
box-shadow: none;
margin-top: 0;
top: 0;
outline: none;
}
.swiper-button-prev:after, .swiper-container-rtl .swiper-button-next:after {
content: '';
}
.swiper-button-next {
width: 40px;
height: 40px;
background: #efefef;
right: 0;
margin-top: 0;
top: 0;
outline: none;
}
.swiper-button-next:after, .swiper-container-rtl .swiper-button-prev:after {
content: '';
}
.swiper-slide {
width: auto !important;
}
.swiper-container {
width: calc(100% - 80px);
height: 40px;
/*background: red;*/
}
#iframe-tab-container.sidebar-dark-white #iframe-tab .nav-link {
border-right: 0;
}
#iframe-tab-container.sidebar-dark-white #iframe-tab .nav-link.active{
background: #1e1e2d;
}
#iframe-tab-container.sidebar-dark-white{
border-top: 1px solid #2c2c42;
}
#iframe-tab-container.sidebar-dark-white .swiper-button-prev,#iframe-tab-container.sidebar-dark-white .swiper-button-next{
background: #0e0e1d;
box-sizing: border-box;
border: 1px solid #2c2c42;
}
#iframe-tab-container.sidebar-dark-white .swiper-button-prev i,#iframe-tab-container.sidebar-dark-white .swiper-button-next i{
color: #efefef;
}
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('\'2B 2C\';$(5(){4 j=2D 2E(\'.14-1Y\',{2F:\'1Z\',2G:0,2H:z,2I:z,2J:z,2K:{2L:\'.14-20-21\',2M:\'.14-20-22\'},2N:z,2O:z,2P:z,2Q:{2R:0.3},2S:z});4 k={1g:$(\'#7-v-1Y\'),G:$(\'#7-v\'),2T:$(\'#7-v .q-t\'),F:$(\'#7-2U\'),2V:$(\'.7-v-J-T\'),U:$(\'.23-L .q-t:2W(.1y-1z .q-t)\'),15:$(\'.23-L-2X .1h\'),24:$(".1i-L .1i-V"),1A:$(".1i-L")};4 l={1j:5 1j(a,b){4 c=1B.M<=2||1B[2]===2Y?z:1B[2];4 d=\'\';4 e=\'N-W=1\';9(c){d=\'<25 2Z="关闭标签页" 17="7-v-J-T"><i 17="26 26-30-31"></i></25>\';e=\'N-W=0\'}r\'\\n <X 17="q-V 14-32" 1C="33">\\n <a \'+e+\' 17="q-t A" B="7-Y-\'+b+\'" N-34="35" u="#7-\'+b+\'" 1C="v" O-36="7-\'+b+\'" O-18="z">\\n \'+a+\'\\n \'+d+\'\\n </a>\\n </X>\\n \'},1k:5 1k(a,b){r\'\\n <27 17="v-28 37 P A" B="7-\'+b+\'" 1C="38" O-39="7-Y-\'+b+\'">\\n <7\\n 3a="3b: 3c;29: 1l%;2a: 1l%;2b: 0;2c: 0;3d: 0;3e: 0;"\\n H="\'+a+\'" 29="1l%" 2a="1l%" 3f="2d" 3g="0" 3h="0"\\n 3i="0"\\n 2e-x="2d" 2e-y="1Z" 3j="3k"></7>\\n </27>\\n \'}};4 m={Z:$(\'#3l\').1m()+\'3m\',E:\'\',1n:2f($(\'#3n\').1m()),1o:2f($(\'#3o\').1m()),Q:5 Q(){4 a=19.1p(6.Z);r 1a.2g(a)===3p?{}:1a.2g(a)},1D:5 1D(a,b){4 c=6.Q();c[a]=b;4 d=1a.1E(c);19.1q(6.Z,d);r c},1F:5 1F(a){4 b=6.Q();9(b[a]){3q b[a];19.1q(6.Z,1a.1E(b))}r b},1r:5 1r(){19.3r(6.Z)},1G:5 1G(){k.U.1H(\'s\');k.24.1H(\'s\');$(\'.1y-1z\').p(\'a\').1H(\'s\');4 b=k.15.p(\'X\');b.p(\'a\').s(5(e){4 a=$(6).o(\'u\');9(!a||a===\'#\'){r}e.2h();b.p(\'.q-t\').10(\'A\');$(6).C(\'A\')});k.1A.p(\'.1i-V\').s(5(e){4 a=$(6).o(\'u\');9(!a||a===\'#\'){r}e.2h()})},1I:5 1I(){4 a=k.15.p(\'X\');a.p(\'a\').s(m.1s);k.1A.p(\'a\').s(m.1s);$(\'.1y-1z\').p(\'a\').s(5(){2i.u=$(6).o(\'u\')})},1s:5 1s(){4 a=$(6).1t(),u=$(6).o(\'u\'),B=m.1b(u);9(!u||u===\'#\'){r}9(u.3s("3t")!==-1){2i.u=u;r}4 b=l.1j(a,B),R=l.1k(u,B),2j=m.1u();m.11();m.S(2j);9(k.G.p(\'#7-Y-\'+B).M<=0){j.1J(b);k.F.12(R);4 c=$(\'#7-Y-\'+B),2k=c.I(\'.q-V\').2l(),1K=$(\'#7-\'+B);j.2m(2k);j.1L();c.C(\'A\');c.o(\'O-18\',\'z\');1K.C(\'A\');1K.C(\'P\');m.S(c)}2n{k.G.p(\'#7-Y-\'+B).s()}},1v:5 1v(){4 a=$(k.U[0]).1t();4 b=$(k.U[0]).o(\'u\');4 c=6.1b(b);j.1J(l.1j(a,c,1c));k.F.12(l.1k(b,c));j.1L()},11:5 11(){k.G.p(\'.q-t\').10(\'A\');k.G.p(\'.q-t\').o(\'O-18\',\'1c\');k.F.p(\'.v-28\').10(\'A\',\'P\')},1w:5 1w(a){a.p(\'.q-t\').s();m.11();a.p(\'.q-t\').C(\'A\');a.p(\'.q-t\').o(\'O-18\',\'z\');4 b=a.p(\'.q-t\').o(\'u\');k.F.p(b).C(\'A\');k.F.p(b).C(\'P\')},1M:5 1M(){$(w).D(\'s\',\'.7-v-J-T\',5(e){4 a=$(6).I(".q-t").o(\'N-W\');9(a===\'1\'){r}4 b=$(6).I(".q-V");9($(6).I(".q-t").2o(\'A\')){4 c=b.21();4 d=b.22();9(c.M>0){m.1w(c)}2n{m.1w(d)}}4 f=$($(6).I(".q-t").o(\'u\'));b.1N();f.1N();9(m.1n===1){m.1F($(6).I(".q-t").o(\'B\').2p("-").2q())}e.3u()});$(w).D(\'3v\',\'#7-v .q-t\',5(e){$(6).p(\'.7-v-J-T\').s();r 1c});$(w).D(\'s\',\'#7-v .q-t\',5(){4 a=$(6).o(\'u\');9(m.1o===1&&$(\'\'+a).M<=0){4 b=a.2r(\'#7-\',"");1d.1e(b);1d.1e(m.Q());k.F.12(m.Q()[b].R);m.11()}4 c=$(\'\'+a);m.1x(a);$(6).C(\'A\');$(6).o(\'O-18\',\'z\');c.C(\'A\');c.C(\'P\');4 d=$(6).I(\'.q-V\').2l();j.2m(d);j.1L();m.S($(6))});$(w).D(\'3w.3x.v\',\'#7-v .q-t\',5(a){m.S($(a.3y))});$(w).D(\'3z\',\'#7-v .q-t\',5(a){w.K=5(){r 1c};4 b=a.3A;9(b===3){4 x=a.3B;4 y=a.3C;$(\'.2s-s-L\').P().3D({2b:x,2c:y});m.E=$(6)}})},1O:5 1O(){$(w).D(\'s\',\'.v-2t-t\',5(){9(m.E!==\'\'){4 a=m.E.o("u");4 b=$(a+\' > 7\').o("H");4 c=$(\'<3E>\');$("3F").12(c);c.1m(b).3G();w.3H("2t");c.1N();$(6).3I(\'P\');1P.1Q(\'复制成功\')}w.K=5(){r z}});$(w).D(\'s\',\'.v-1R-t\',5(){9(m.E!==\'\'){4 a=m.E.o("u");4 b=$(a+\' > 7\').o("H");1S.1R(b)}w.K=5(){r z}});$(w).D(\'s\',\'.v-J-3J\',5(){9(m.E!==\'\'){k.G.p(\'.q-t\').1T(5(){4 a=$(6).o(\'N-W\');9(a===\'1\'){r}$(6).p(\'.7-v-J-T\').s()})}w.K=5(){r z}});$(w).D(\'s\',\'.v-J-3K\',5(){9(m.E!==\'\'){k.G.p(\'.q-t\').1T(5(){4 a=$(6).o(\'N-W\');9(a===\'1\'){r}9(m.E.o(\'B\')===$(6).o(\'B\')){m.E.s();r}m.S($(6));$(6).p(\'.7-v-J-T\').s()})}w.K=5(){r z}});$(w).D(\'s\',\'.v-3L-3M\',5(){m.1r();1P.1Q(\'缓存已清空\');k.G.1t(\'\');k.F.1t(\'\');m.1v();k.15.p(\'.q-t.A\').10(\'A\');$(k.U[0]).C(\'A\');w.K=5(){r z}});$(w).D(\'s\',\'.v-3N\',5(){9(m.E!==\'\'){4 a=$(m.E.o("u")+\' > 7\'),H=a.o(\'H\');a.o(\'H\',\'\');a.o(\'H\',H);1P.1Q(\'页面已刷新\')}w.K=5(){r z}});$(w).D(\'s\',5(){w.K=5(){r z};$(\'.2s-s-L\').2u()})},1U:5 1U(){9(6.1n===0){6.1r();r}4 a=6.Q();1d.1e(a);9(a.M===0||1a.1E(a)==="{}"){r}m.11();2v(4 i 2w a){j.1J(a[i].2x)}9(m.1o===0){2v(4 b 2w a){k.F.12(a[b].R)}}4 c=m.1u();4 d=1c;9(c.M<=0){d=z;4 e=$(k.U[0]).o(\'u\');4 f=6.1b(e);$(\'#7-Y-\'+f).s()}4 g=c.o(\'u\');9(m.1o===1&&!d){4 h=g.2r(\'#7-\',"");1d.1e(h);1d.1e(a[h].R);k.F.12(a[h].R)}m.1x(g)},S:5 S(a){9(6.1n!==1){r}9(a.o(\'N-W\')!==\'1\'){4 b=a.o(\'B\').2p("-").2q();4 c=a.I(\'X\').2y(\'2z\');4 d=$(\'#7-\'+b).2y(\'2z\');6.1D(b,{B:b,2x:c,R:d})}},1u:5 1u(){r k.G.p(\'.q-t.A\')},1x:5 1x(c){4 d=$(c+\' > 7\').o(\'H\');4 e=k.15.p(\'X\');e.p(\'a\').1T(5(){4 a=$(6).o(\'u\');9(!a||a===\'#\'){r}9(a===d){e.p(\'.q-t\').10(\'A\');$(6).C(\'A\');4 b=$(6).I(\'.3O-3P\');9(b.M>0&&!b.2o(\'L-1R\')){b.p("a[u=\'#\']").s()}}})},1V:5 1V(){6.1G();6.1v();6.1I();6.1U();6.1M();6.1O();6.1W()},1W:5 1W(){4 a=1S.3Q.19||{1q:5 1q(){},1p:5 1p(){}},2A=\'3R-3S-3T-1f\',1f=a.1p(2A);9(1f===\'13\'){k.1g.C(\'1h-13-1X\')}$(w).D(\'13-1f.3U\',5(){k.1g.C(\'1h-13-1X\')});$(w).D(\'13-1f.2u\',5(){k.1g.10(\'1h-13-1X\')})},1b:5 1b(a){r 3V(a+6.Z).3W(8,16)}};1S.3X={14:j,3Y:k,3Z:l,40:m};m.1V()});',62,249,'||||var|function|this|iframe||if|||||||||||||||attr|find|nav|return|click|link|href|tab|document|||true|active|id|addClass|on|CLICK_TAB|iframe_tabContent|iframe_tab|src|parents|close|oncontextmenu|menu|length|data|aria|show|storageGet|tab_content_html|cacheUpdateTabBar|btn|menu_link|item|first|li|home|TAB_STORAGE_KEY|removeClass|removeTabBarStyle|append|dark|swiper|menu_content||class|selected|localStorage|JSON|generateID|false|console|log|mode|iframe_tab_container|sidebar|dropdown|tabItem|tabContentItem|100|val|USE_CACHE|LAZY_LOAD|getItem|setItem|storageDeleteAll|menuClickCallback|html|findIframeTabActiveElement|joinFirstMenu|closeAdjacentOperate|linkMenuAndIframeTab|navbar|header|drop_menu|arguments|role|storageSet|stringify|storageDelete|clearDefaultMenuEvent|unbind|menuClick|appendSlide|content_element|updateSlides|iframeTabEventRegister|remove|rightClickEventRegister|Dcat|success|open|window|each|cacheInit|init|darkMode|white|container|auto|button|next|prev|main|drop_menu_link|span|fa|div|pane|width|height|left|top|no|scrolling|parseInt|parse|preventDefault|location|choose_element|_index|index|slideTo|else|hasClass|split|pop|replace|mouse|copy|hide|for|in|tab_html|prop|outerHTML|key|use|strict|new|Swiper|slidesPerView|spaceBetween|freeMode|watchSlidesProgress|watchSlidesVisibility|navigation|nextEl|prevEl|observer|observeParents|observeSlideChildren|mousewheel|sensitivity|grabCursor|iframe_tab_link|tabContent|item_close|not|content|undefined|title|minus|circle|slide|presentation|toggle|pill|controls|fade|tabpanel|labelledby|style|position|absolute|right|bottom|frameborder|border|marginwidth|marginheight|allowtransparency|yes|use_id|_6d9e562706a26cd2|iframe_tab_cache|iframe_tab_lazy_load|null|delete|removeItem|indexOf|logout|stopPropagation|dblclick|hidden|bs|target|mousedown|which|clientX|clientY|css|input|body|select|execCommand|tooltip|all|other|clear|cache|refresh|has|treeview|parent|dcat|admin|theme|shown|md5|substr|iframeTabParent|elements|iframeTabTemplate|iframeTab'.split('|'),0,{}))
\ No newline at end of file
$(function(){window.parent.iframeTabParent&&0<$("a[iframe-extends=true]").length&&function(){var a=window.parent.iframeTabParent,f={addTab:function(c){var d=1>=arguments.length||void 0===arguments[1]?"":arguments[1],e=2>=arguments.length||void 0===arguments[2]?"icon-circle":arguments[2],b="";""!==d&&(b+=d+"-");d='&nbsp;<i class="fa fa-fw feather '+e+'"></i><p>'+(b+c.text())+"</p>";e=c.attr("href");b=a.iframeTab.generateID(e);if(0<a.elements.iframe_tab.find("#iframe-home-"+b).length)return a.elements.iframe_tab.find("#iframe-home-"+
b).click(),!1;var g=a.iframeTab.findIframeTabActiveElement();a.swiper.appendSlide(a.iframeTabTemplate.tabItem(d,b));a.elements.iframe_tabContent.append(a.iframeTabTemplate.tabContentItem(e,b));a.swiper.updateSlides();a.iframeTab.removeTabBarStyle();a.iframeTab.cacheUpdateTabBar(g);a.elements.iframe_tab.find("#iframe-home-"+b).click()},init:function(){$(document).on("click","a[iframe-tab=true]",function(c){f.addTab($(this));c.preventDefault()})}};f.init()}()});
\ No newline at end of file
/*
* JavaScript MD5
* https://github.com/blueimp/JavaScript-MD5
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*
* Based on
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/* global define */
;(function ($) {
'use strict'
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safeAdd (x, y) {
var lsw = (x & 0xffff) + (y & 0xffff)
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xffff)
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bitRotateLeft (num, cnt) {
return (num << cnt) | (num >>> (32 - cnt))
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5cmn (q, a, b, x, s, t) {
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)
}
function md5ff (a, b, c, d, x, s, t) {
return md5cmn((b & c) | (~b & d), a, b, x, s, t)
}
function md5gg (a, b, c, d, x, s, t) {
return md5cmn((b & d) | (c & ~d), a, b, x, s, t)
}
function md5hh (a, b, c, d, x, s, t) {
return md5cmn(b ^ c ^ d, a, b, x, s, t)
}
function md5ii (a, b, c, d, x, s, t) {
return md5cmn(c ^ (b | ~d), a, b, x, s, t)
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length.
*/
function binlMD5 (x, len) {
/* append padding */
x[len >> 5] |= 0x80 << (len % 32)
x[((len + 64) >>> 9 << 4) + 14] = len
var i
var olda
var oldb
var oldc
var oldd
var a = 1732584193
var b = -271733879
var c = -1732584194
var d = 271733878
for (i = 0; i < x.length; i += 16) {
olda = a
oldb = b
oldc = c
oldd = d
a = md5ff(a, b, c, d, x[i], 7, -680876936)
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)
c = md5ff(c, d, a, b, x[i + 10], 17, -42063)
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)
b = md5gg(b, c, d, a, x[i], 20, -373897302)
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)
a = md5hh(a, b, c, d, x[i + 5], 4, -378558)
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)
d = md5hh(d, a, b, c, x[i], 11, -358537222)
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)
a = md5ii(a, b, c, d, x[i], 6, -198630844)
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)
a = safeAdd(a, olda)
b = safeAdd(b, oldb)
c = safeAdd(c, oldc)
d = safeAdd(d, oldd)
}
return [a, b, c, d]
}
/*
* Convert an array of little-endian words to a string
*/
function binl2rstr (input) {
var i
var output = ''
var length32 = input.length * 32
for (i = 0; i < length32; i += 8) {
output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff)
}
return output
}
/*
* Convert a raw string to an array of little-endian words
* Characters >255 have their high-byte silently ignored.
*/
function rstr2binl (input) {
var i
var output = []
output[(input.length >> 2) - 1] = undefined
for (i = 0; i < output.length; i += 1) {
output[i] = 0
}
var length8 = input.length * 8
for (i = 0; i < length8; i += 8) {
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32)
}
return output
}
/*
* Calculate the MD5 of a raw string
*/
function rstrMD5 (s) {
return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))
}
/*
* Calculate the HMAC-MD5, of a key and some data (raw strings)
*/
function rstrHMACMD5 (key, data) {
var i
var bkey = rstr2binl(key)
var ipad = []
var opad = []
var hash
ipad[15] = opad[15] = undefined
if (bkey.length > 16) {
bkey = binlMD5(bkey, key.length * 8)
}
for (i = 0; i < 16; i += 1) {
ipad[i] = bkey[i] ^ 0x36363636
opad[i] = bkey[i] ^ 0x5c5c5c5c
}
hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)
return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))
}
/*
* Convert a raw string to a hex string
*/
function rstr2hex (input) {
var hexTab = '0123456789abcdef'
var output = ''
var x
var i
for (i = 0; i < input.length; i += 1) {
x = input.charCodeAt(i)
output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)
}
return output
}
/*
* Encode a string as utf-8
*/
function str2rstrUTF8 (input) {
return unescape(encodeURIComponent(input))
}
/*
* Take string arguments and return either raw or hex encoded strings
*/
function rawMD5 (s) {
return rstrMD5(str2rstrUTF8(s))
}
function hexMD5 (s) {
return rstr2hex(rawMD5(s))
}
function rawHMACMD5 (k, d) {
return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))
}
function hexHMACMD5 (k, d) {
return rstr2hex(rawHMACMD5(k, d))
}
function md5 (string, key, raw) {
if (!key) {
if (!raw) {
return hexMD5(string)
}
return rawMD5(string)
}
if (!raw) {
return hexHMACMD5(key, string)
}
return rawHMACMD5(key, string)
}
if (typeof define === 'function' && define.amd) {
define(function () {
return md5
})
} else if (typeof module === 'object' && module.exports) {
module.exports = md5
} else {
$.md5 = md5
}
})(this)
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment