Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
桩
桩基检测
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张牧越
桩基检测
Commits
d3472e8b
Commit
d3472e8b
authored
Jun 24, 2024
by
陈珊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
bd08ff4f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
991 additions
and
331 deletions
+991
-331
htjc.html
pages/htjc.html
+13
-3
jzjc.html
pages/jzjc.html
+1
-1
xcjc.html
pages/xcjc.html
+1
-1
zjjc.html
pages/zjjc.html
+3
-3
htjc.scss
static/css/scss/htjc.scss
+2
-88
htjc.js
static/js/htjc.js
+98
-23
md5.js
static/js/md5.js
+860
-191
public.js
static/js/public.js
+7
-12
xcjc.js
static/js/xcjc.js
+5
-9
zjjc.js
static/js/zjjc.js
+1
-0
No files found.
pages/htjc.html
View file @
d3472e8b
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<script
src=
"../static/plugin/layui/layui.js"
></script>
<script
src=
"../static/plugin/layui/layui.js"
></script>
<script
src=
"../static/js/public.js?v=1.0.1"
></script>
<script
src=
"../static/js/public.js?v=1.0.1"
></script>
<script
src=
"../static/js/swiper.min.js"
></script>
<script
src=
"../static/js/swiper.min.js"
></script>
<script
src=
"../static/js/md5.js"
></script>
<style>
<style>
.container
.content
.map
.amap-info-content
{
.container
.content
.map
.amap-info-content
{
background
:
rgba
(
0
,
0
,
0
,
0.6
)
!important
;
background
:
rgba
(
0
,
0
,
0
,
0.6
)
!important
;
...
@@ -26,6 +27,15 @@
...
@@ -26,6 +27,15 @@
top
:
5px
!important
;
top
:
5px
!important
;
right
:
5px
!important
;
right
:
5px
!important
;
}
}
.hover-row
:hover
{
background-color
:
rgba
(
42
,
93
,
197
,
0.8
)
!important
;
}
.hover-row
{
background-color
:
rgba
(
42
,
93
,
197
,
0.4
)
!important
;
margin-bottom
:
10px
;
}
</style>
</style>
</head>
</head>
...
@@ -93,7 +103,7 @@
...
@@ -93,7 +103,7 @@
<div
id=
"popup-info"
class=
"popup-info hidden"
>
<div
id=
"popup-info"
class=
"popup-info hidden"
>
<div
class=
"head"
></div>
<div
class=
"head"
></div>
<div
class=
"tab"
>
<div
class=
"tab"
>
</div>
</div>
<div
class=
"main data-detail-main"
>
<div
class=
"main data-detail-main"
>
<div
class=
"left-item"
id=
"subrwList"
>
<div
class=
"left-item"
id=
"subrwList"
>
...
@@ -110,7 +120,7 @@
...
@@ -110,7 +120,7 @@
<div
id=
"popup-info-change-list"
class=
"popup-info hidden"
>
<div
id=
"popup-info-change-list"
class=
"popup-info hidden"
>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"table"
>
<div
class=
"table"
>
<table
cellspacing=
"0"
>
<table
cellspacing=
"0"
>
<thead
class=
"table-head"
>
<thead
class=
"table-head"
>
<tr>
<tr>
<th
width=
"25%"
>
修改人员
</th>
<th
width=
"25%"
>
修改人员
</th>
...
@@ -123,7 +133,7 @@
...
@@ -123,7 +133,7 @@
<tbody
class=
"table-body"
>
<tbody
class=
"table-body"
>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
pages/jzjc.html
View file @
d3472e8b
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
</body>
</body>
<script
type=
"text/javascript"
<script
type=
"text/javascript"
src=
"https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"
></script>
src=
"https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"
></script>
<script
src=
"../static/js/jzjc.js"
></script>
<script
src=
"../static/js/jzjc.js
?vt=1.0.1
"
></script>
<script>
<script>
$
(
function
()
{
$
(
function
()
{
$
(
"#jzjc-item a"
).
addClass
(
'active'
);
$
(
"#jzjc-item a"
).
addClass
(
'active'
);
...
...
pages/xcjc.html
View file @
d3472e8b
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
<div
id=
"popup-info"
class=
"hidden popup-info"
></div>
<div
id=
"popup-info"
class=
"hidden popup-info"
></div>
</body>
</body>
<script
type=
"text/javascript"
src=
"https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"
></script>
<script
type=
"text/javascript"
src=
"https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"
></script>
<script
src=
"../static/js/xcjc.js"
></script>
<script
src=
"../static/js/xcjc.js
?vt=1.0.1
"
></script>
<script>
<script>
$
(
function
(){
$
(
function
(){
$
(
"#xcjc-item a"
).
addClass
(
'active'
);
$
(
"#xcjc-item a"
).
addClass
(
'active'
);
...
...
pages/zjjc.html
View file @
d3472e8b
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
<link
rel=
"stylesheet"
href=
"../static/plugin/layui/css/layui.css"
>
<link
rel=
"stylesheet"
href=
"../static/plugin/layui/css/layui.css"
>
<link
rel=
"stylesheet"
href=
"../static/css/dist/swiper.css"
>
<link
rel=
"stylesheet"
href=
"../static/css/dist/swiper.css"
>
<link
rel=
"stylesheet"
href=
"../static/css/dist/public.css"
>
<link
rel=
"stylesheet"
href=
"../static/css/dist/public.css"
>
<link
rel=
"stylesheet"
href=
"../static/css/dist/zjjc.css"
>
<link
rel=
"stylesheet"
href=
"../static/css/dist/zjjc.css
?vt=1.0.2
"
>
<script
src=
"../static/js/jquery-3.0.0.min.js"
></script>
<script
src=
"../static/js/jquery-3.0.0.min.js"
></script>
<script
src=
"../static/plugin/layui/layui.js"
></script>
<script
src=
"../static/plugin/layui/layui.js"
></script>
<script
src=
"../static/js/public.js"
></script>
<script
src=
"../static/js/public.js
?vt=1.0.1
"
></script>
<script
src=
"../static/js/swiper.min.js"
></script>
<script
src=
"../static/js/swiper.min.js"
></script>
</head>
</head>
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
</body>
</body>
<script
type=
"text/javascript"
<script
type=
"text/javascript"
src=
"https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"
></script>
src=
"https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"
></script>
<script
src=
"../static/js/zjjc.js"
></script>
<script
src=
"../static/js/zjjc.js
?vt=1.0.3
"
></script>
<script>
<script>
$
(
function
()
{
$
(
function
()
{
$
(
"#zjjc-item a"
).
addClass
(
'active'
);
$
(
"#zjjc-item a"
).
addClass
(
'active'
);
...
...
static/css/scss/htjc.scss
View file @
d3472e8b
...
@@ -15,18 +15,7 @@
...
@@ -15,18 +15,7 @@
.map
{
.map
{
.info-item
{
.info-item
{
cursor
:
pointer
;
cursor
:
pointer
;
display
:
flex
;
padding
:
12px
27px
10px
12px
;
align-items
:
center
;
padding-right
:
.3rem
;
.btn
{
font-size
:
.14rem
;
color
:
$white
;
border
:
$border
$white
;
border-radius
:
.12rem
;
padding
:
.05rem
.1rem
;
cursor
:
pointer
;
white-space
:
nowrap
;
}
}
}
.bottom-center
.amap-info-sharp
{
.bottom-center
.amap-info-sharp
{
border-top-color
:
rgba
(
0
,
0
,
0
,
0
.6
);
border-top-color
:
rgba
(
0
,
0
,
0
,
0
.6
);
...
@@ -219,10 +208,6 @@
...
@@ -219,10 +208,6 @@
background
:
rgba
(
22
,
65
,
152
,
0
.3
);
background
:
rgba
(
22
,
65
,
152
,
0
.3
);
padding
:
.13rem
;
padding
:
.13rem
;
border-top
:
.01rem
solid
rgba
(
68
,
109
,
193
,
0
.8
);
border-top
:
.01rem
solid
rgba
(
68
,
109
,
193
,
0
.8
);
&
:hover
{
cursor
:
pointer
;
background
:
rgba
(
12
,
112
,
164
,
0
.8
);
}
.green
{
.green
{
color
:
#00FFA2
;
color
:
#00FFA2
;
}
}
...
@@ -672,75 +657,4 @@
...
@@ -672,75 +657,4 @@
height
:
0
.25rem
;
height
:
0
.25rem
;
}
}
}
}
}
}
\ No newline at end of file
.layui-label
{
color
:
#fff
;
margin-bottom
:
12px
;
}
#popup-unusual
{
position
:
relative
;
}
.submit-btn
{
position
:
absolute
;
left
:
50%
;
bottom
:
.7rem
;
transform
:
translateX
(
-50%
);
width
:
100%
;
text-align
:
center
;
}
.layui-form
{
padding
:
20px
;
}
.layui-form
.layui-input
{
background
:
transparent
;
border-color
:
#4470C5
;
color
:
#fff
;
}
.layui-form
textarea
{
background
:
transparent
;
border-color
:
#4470C5
;
color
:
#fFF
;
}
.layui-form-select
dl
{
background
:
#1E499B
;
color
:
#fff
;
border-color
:
#4470C5
;
}
.layui-form-select
dl
dd
.layui-this
{
background-color
:
#3069F4
;
}
.layui-form-select
dl
dd
:hover
{
background-color
:
#46A6D8
;
}
table
{
width
:
100%
;
table-layout
:
fixed
;
}
td
{
width
:
100%
;
word-break
:
keep-all
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.switch
{
height
:
inherit
;
padding
:
6px
12px
;
line-height
:
inherit
;
background-color
:
#46A6D8
;
}
\ No newline at end of file
static/js/htjc.js
View file @
d3472e8b
function
getAccess
(
cb
)
{
var
api_secret
=
"40DB5CA9-9FA7-45E6-95B9-E7E8AF24F699"
;
var
api_key
=
"10014"
;
var
timestamp
=
new
Date
().
getTime
();
$
.
ajax
({
url
:
`
${
newBaseURL_htjc
}
access`
,
type
:
"post"
,
contentType
:
"application/json"
,
data
:
JSON
.
stringify
({
api_key
,
timestamp
,
sign
:
md5
(
`api_key
${
api_key
}
timestamp
${
timestamp
}${
api_secret
}
`
),
}),
success
:
(
res
)
=>
{
if
(
res
.
status
==
200
)
{
$
.
ajaxSetup
({
beforeSend
:
(
xhr
)
=>
{
xhr
.
setRequestHeader
(
'Authorization'
,
`
${
res
.
data
.
token_type
}
${
res
.
data
.
access_token
}
`
);
// 添加其他需要的头部
}
});
if
(
cb
)
{
cb
()
}
}
}
})
}
var
laydateObj
;
var
laydateObj
;
var
taskList
=
{
var
taskList
=
{
data
:
[],
data
:
[],
...
@@ -307,7 +341,7 @@ var detail = {
...
@@ -307,7 +341,7 @@ var detail = {
date
:
$
(
"#rw-date"
).
val
(),
date
:
$
(
"#rw-date"
).
val
(),
},
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
data
&&
data
.
data
.
length
>
0
)
{
if
(
data
.
data
&&
data
.
data
.
length
>
0
)
{
...
@@ -335,7 +369,7 @@ var detail = {
...
@@ -335,7 +369,7 @@ var detail = {
$
(
"#popup-info .tab"
).
html
(
str
);
$
(
"#popup-info .tab"
).
html
(
str
);
},
},
changeTab
(
val
)
{
changeTab
(
val
)
{
this
.
selectedTab
=
val
this
.
selectedTab
=
val
$
(
'.tabBox'
).
children
().
removeClass
(
'actived'
)
$
(
'.tabBox'
).
children
().
removeClass
(
'actived'
)
$
(
`.tabBox .
${
val
}
`
).
addClass
(
'actived'
)
$
(
`.tabBox .
${
val
}
`
).
addClass
(
'actived'
)
...
@@ -396,7 +430,7 @@ var detail = {
...
@@ -396,7 +430,7 @@ var detail = {
},
},
setRightData(index, id) {
setRightData(index, id) {
sublistClick(id);
sublistClick(id);
var item = this.data[index];
var item = this.data[index];
$("#subrwList .info-item").removeClass("active");
$("#subrwList .info-item").removeClass("active");
$("#subrwList .flex-item").removeClass("active");
$("#subrwList .flex-item").removeClass("active");
...
@@ -459,8 +493,8 @@ var detail = {
...
@@ -459,8 +493,8 @@ var detail = {
console
.
log
(
sample_id
,
index
,
index2
);
console
.
log
(
sample_id
,
index
,
index2
);
let
_this
=
this
;
let
_this
=
this
;
$
.
ajax
({
$
.
ajax
({
url
:
baseURL_htjc
+
"GetPartInfo.ashx
"
,
url
:
newBaseURL_htjc
+
"screen/htjc/sjxq_jcbw
"
,
type
:
"
pos
t"
,
type
:
"
ge
t"
,
dataType
:
"json"
,
dataType
:
"json"
,
data
:
{
data
:
{
sample_id
sample_id
...
@@ -497,10 +531,25 @@ var detail = {
...
@@ -497,10 +531,25 @@ var detail = {
${
item
.
test_status
==
1
&&
item
.
ysjl_list
&&
item
.
ysjl_list
.
length
>
0
?
${
item
.
test_status
==
1
&&
item
.
ysjl_list
&&
item
.
ysjl_list
.
length
>
0
?
item
.
ysjl_list
.
map
((
item2
,
index2
)
=>
{
item
.
ysjl_list
.
map
((
item2
,
index2
)
=>
{
return
(
`
return
(
`
<div class="item
${
item2
.
test_status
==
'1'
?
'common'
:
'fail'
}
" onmouseover="mouseover(
${
index2
}
, event)" onmouseout="mouseout()">
${
item2
.
jc_data21
}
${
item2
.
is_change
>
0
?
'<img class="icon-change" src="../static/images/icon-change.png" />'
:
''
}
${
item2
.
ysjl_list
?
`
<div style="margin-bottom:10px">
<div class="flex-item hover-row" style="position:relative;cursor:pointer" onclick="toggleContainer(
${
index2
}
)">
<div class="value">构件名称:
${
item2
.
gj_name
}
</div>
${
item2
.
gj_no
?
`<div class="value">构件编号:
${
item2
.
gj_no
}
</div>`
:
''
}
<img src="../static/images/jiantou.png" id="block_arrow_
${
index2
}
" style="width:10px;height:10px;position:absolute;top:8px;right:10px;transform"/>
</div>
<div class="item-container" id="block_
${
index2
}
" style="display:none;flex-wrap:wrap">
${
item2
.
ysjl_list
&&
item
.
ysjl_list
.
length
>
0
?
item2
.
ysjl_list
.
map
((
innerItem
,
innerIndex
)
=>
{
return
`<div class="item
${
innerItem
.
test_status
==
'1'
?
'common'
:
'fail'
}
" onmouseover="mouseover(
${
index2
}
,
${
innerIndex
}
, event)" onmouseout="mouseout()">
${
innerItem
.
jc_data21
?
innerItem
.
jc_data21
:
'未计算'
}
${
modifyChange
(
innerItem
.
change_list
[
0
])
>
0
?
'<img class="icon-change" src="../static/images/icon-change.png" />'
:
''
}
</div>`
}).
join
(
''
)
:
''
}
</div>
</div>
`
);
</div >
`
:
''
}
`
);
}).
join
(
''
)
}).
join
(
''
)
:
'<div class="noData">暂无数据</div>'
:
'<div class="noData">暂无数据</div>'
}
}
...
@@ -527,12 +576,16 @@ var detail = {
...
@@ -527,12 +576,16 @@ var detail = {
}
}
});
});
},
},
showPopupChangeList: function (
sample_id, jc_data26, group_no
, index, val) {
showPopupChangeList: function (
ysjl_id
, index, val) {
$("#popup-info-change-list .content .table .table-body").html('');
$("#popup-info-change-list .content .table .table-body").html('');
$.ajax({
$.ajax({
url:
baseURL_htjc + `GetChangeList.ashx?sample_id=${sample_id}&jc_data26=${jc_data26}&group_no=${group_no}&index=${index}
`,
url:
newBaseURL_htjc + `screen/htjc/xgjl
`,
type: "get",
type: "get",
data: {
ysjl_id,
index
},
dataType: "json",
dataType: "json",
success: function (data) {
success: function (data) {
...
@@ -553,7 +606,7 @@ var detail = {
...
@@ -553,7 +606,7 @@ var detail = {
${arr.map(item => {
${arr.map(item => {
return (`
return (`
<tr>
<tr>
<td width="25%">${item.update_opname}</td>
<td width="25%">${item.update_opname
? item.update_opname : ''
}</td>
<td width="25%">${item.update_time}</td>
<td width="25%">${item.update_time}</td>
<td width="25%">${item.jc_data}</td>
<td width="25%">${item.jc_data}</td>
<td width="25%">${item.newVal}</td>
<td width="25%">${item.newVal}</td>
...
@@ -628,26 +681,25 @@ var detail = {
...
@@ -628,26 +681,25 @@ var detail = {
var
hoverInfoTime
;
var
hoverInfoTime
;
var
isHoverInfoModal
;
// 弹窗是否正在显示
var
isHoverInfoModal
;
// 弹窗是否正在显示
function
mouseover
(
index
,
e
)
{
function
mouseover
(
index
,
indexInner
,
e
)
{
if
(
isHoverInfoModal
)
{
if
(
isHoverInfoModal
)
{
return
return
}
}
var
arr
=
[];
var
arr
=
[];
let
notArr
=
[
'jc_data21'
,
'test_status'
,
'change_list'
,
'group_no'
,
'is_change'
,
'jc_data26'
]
let
notArr
=
[
'jc_data21'
,
'test_status'
,
'change_list'
,
'group_no'
,
'is_change'
,
'jc_data26'
,
'ysjl_id'
]
for
(
i
in
detail
.
ysjl_list
[
index
])
{
for
(
i
in
detail
.
ysjl_list
[
index
]
.
ysjl_list
[
indexInner
]
)
{
if
(
!
notArr
.
includes
(
i
))
{
if
(
!
notArr
.
includes
(
i
))
{
arr
.
push
(
detail
.
ysjl_list
[
index
][
i
]);
arr
.
push
(
detail
.
ysjl_list
[
index
]
.
ysjl_list
[
indexInner
]
[
i
]);
}
}
}
}
$
(
"#hoverInfo"
).
html
(
`
$
(
"#hoverInfo"
).
html
(
`
${
arr
.
map
((
item2
,
index2
)
=>
{
${
arr
.
map
((
item2
,
index2
)
=>
{
let
bool
=
detail
.
ysjl_list
[
index
].
change_list
[
0
][
`is_change
${
index2
+
1
}
`
]
>
0
let
bool
=
detail
.
ysjl_list
[
index
].
ysjl_list
[
indexInner
].
change_list
[
0
][
`is_change
${
index2
+
1
}
`
]
>
0
return
(
`
return
(
`
<div onClick="detail.showPopupChangeList('
${
detail
.
sample_id
}
', '
${
detail
.
ysjl_list
[
index
].
jc_data26
}
','
${
detail
.
ysjl_list
[
index
].
group_no
}
','
${
index2
+
1
}
','
${
item2
}
')" class="
${
bool
?
'modification'
:
''
}
">
${
item2
}
</div>
<div onClick="detail.showPopupChangeList('
${
detail
.
ysjl_list
[
index
].
ysjl_list
[
indexInner
].
ysjl_id
}
','
${
index2
+
1
}
','
${
item2
}
')" class="
${
bool
?
'modification'
:
''
}
">
${
item2
}
</div>
`
);
`
);
}).
join
(
''
)
}).
join
(
''
)
}
}
...
@@ -779,7 +831,7 @@ var testLocationMap = {
...
@@ -779,7 +831,7 @@ var testLocationMap = {
}
);
}
);
});
});
marker.on("mouseout", () => {
marker.on("mouseout", () => {
if (this.isShowMarkerObj[index]) {
if (this.isShowMarkerObj[index]) {
return;
return;
}
}
...
@@ -792,14 +844,14 @@ var testLocationMap = {
...
@@ -792,14 +844,14 @@ var testLocationMap = {
},
},
modalBoxMouseover: function (index) {
modalBoxMouseover: function (index) {
clearTimeout(this.modalBoxTime)
clearTimeout(this.modalBoxTime)
this.isShowMarkerObj[index] = true
this.isShowMarkerObj[index] = true
},
},
modalBoxMouseout: function (index) {
modalBoxMouseout: function (index) {
clearTimeout(this.modalBoxTime)
clearTimeout(this.modalBoxTime)
this.modalBoxTime = setTimeout(() => {
this.modalBoxTime = setTimeout(() => {
this.markerObj[index].setLabel({
this.markerObj[index].setLabel({
content: null, //设置文本标注内容
content: null, //设置文本标注内容
...
@@ -849,7 +901,7 @@ var testLocationMap = {
...
@@ -849,7 +901,7 @@ var testLocationMap = {
}
}
}
}
init();
function init() {
function init() {
getHeader();
getHeader();
layui.use(['form', 'layer', 'laydate'], function () {
layui.use(['form', 'layer', 'laydate'], function () {
...
@@ -909,4 +961,27 @@ function init() {
...
@@ -909,4 +961,27 @@ function init() {
})
})
taskList.init();
taskList.init();
testCount.init();
testCount.init();
}
}
\ No newline at end of file
function toggleContainer(index) {
console.log($(`
#
block_$
{
index
}
`).css("display"))
if ($(`
#
block_$
{
index
}
`).css("display") == 'flex') {
$(`
#
block_$
{
index
}
`).css("display", "none")
$(`
#
block_arrow_$
{
index
}
`).css("transform", "none")
} else {
$(`
#
block_$
{
index
}
`).css("display", "flex")
$(`
#
block_arrow_$
{
index
}
`).css("transform", "rotate(180deg)")
}
}
function modifyChange(objdata) {
var total = 0
for (var i in objdata) {
total += objdata[i]
}
return total
}
getAccess(() => {
init();
});
\ No newline at end of file
static/js/md5.js
View file @
d3472e8b
/**
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.8.3
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2023
* @license MIT
*/
(
function
()
{
'use strict'
;
function
md5
(
string
)
{
var
INPUT_ERROR
=
'input is invalid type'
;
function
md5_RotateLeft
(
lValue
,
iShiftBits
)
{
var
FINALIZE_ERROR
=
'finalize already called'
;
return
(
lValue
<<
iShiftBits
)
|
(
lValue
>>>
(
32
-
iShiftBits
));
var
WINDOW
=
typeof
window
===
'object'
;
}
var
root
=
WINDOW
?
window
:
{};
if
(
root
.
JS_MD5_NO_WINDOW
)
{
function
md5_AddUnsigned
(
lX
,
lY
)
{
WINDOW
=
false
;
var
lX4
,
lY4
,
lX8
,
lY8
,
lResult
;
}
lX8
=
(
lX
&
0x80000000
);
var
WEB_WORKER
=
!
WINDOW
&&
typeof
self
===
'object'
;
lY8
=
(
lY
&
0x80000000
);
var
NODE_JS
=
!
root
.
JS_MD5_NO_NODE_JS
&&
typeof
process
===
'object'
&&
process
.
versions
&&
process
.
versions
.
node
;
lX4
=
(
lX
&
0x40000000
);
if
(
NODE_JS
)
{
lY4
=
(
lY
&
0x40000000
);
root
=
global
;
lResult
=
(
lX
&
0x3FFFFFFF
)
+
(
lY
&
0x3FFFFFFF
);
}
else
if
(
WEB_WORKER
)
{
if
(
lX4
&
lY4
)
{
root
=
self
;
return
(
lResult
^
0x80000000
^
lX8
^
lY8
);
}
}
var
COMMON_JS
=
!
root
.
JS_MD5_NO_COMMON_JS
&&
typeof
module
===
'object'
&&
module
.
exports
;
if
(
lX4
|
lY4
)
{
var
AMD
=
typeof
define
===
'function'
&&
define
.
amd
;
if
(
lResult
&
0x40000000
)
{
var
ARRAY_BUFFER
=
!
root
.
JS_MD5_NO_ARRAY_BUFFER
&&
typeof
ArrayBuffer
!==
'undefined'
;
return
(
lResult
^
0xC0000000
^
lX8
^
lY8
);
var
HEX_CHARS
=
'0123456789abcdef'
.
split
(
''
);
}
else
{
var
EXTRA
=
[
128
,
32768
,
8388608
,
-
2147483648
];
return
(
lResult
^
0x40000000
^
lX8
^
lY8
);
var
SHIFT
=
[
0
,
8
,
16
,
24
];
}
var
OUTPUT_TYPES
=
[
'hex'
,
'array'
,
'digest'
,
'buffer'
,
'arrayBuffer'
,
'base64'
];
}
else
{
var
BASE64_ENCODE_CHAR
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
.
split
(
''
);
return
(
lResult
^
lX8
^
lY8
);
}
var
blocks
=
[],
buffer8
;
if
(
ARRAY_BUFFER
)
{
var
buffer
=
new
ArrayBuffer
(
68
);
buffer8
=
new
Uint8Array
(
buffer
);
blocks
=
new
Uint32Array
(
buffer
);
}
var
isArray
=
Array
.
isArray
;
if
(
root
.
JS_MD5_NO_NODE_JS
||
!
isArray
)
{
isArray
=
function
(
obj
)
{
return
Object
.
prototype
.
toString
.
call
(
obj
)
===
'[object Array]'
;
};
}
var
isView
=
ArrayBuffer
.
isView
;
if
(
ARRAY_BUFFER
&&
(
root
.
JS_MD5_NO_ARRAY_BUFFER_IS_VIEW
||
!
isView
))
{
isView
=
function
(
obj
)
{
return
typeof
obj
===
'object'
&&
obj
.
buffer
&&
obj
.
buffer
.
constructor
===
ArrayBuffer
;
};
}
// [message: string, isString: bool]
var
formatMessage
=
function
(
message
)
{
var
type
=
typeof
message
;
if
(
type
===
'string'
)
{
return
[
message
,
true
];
}
}
if
(
type
!==
'object'
||
message
===
null
)
{
function
md5_F
(
x
,
y
,
z
)
{
throw
new
Error
(
INPUT_ERROR
);
return
(
x
&
y
)
|
((
~
x
)
&
z
);
}
}
if
(
ARRAY_BUFFER
&&
message
.
constructor
===
ArrayBuffer
)
{
function
md5_G
(
x
,
y
,
z
)
{
return
[
new
Uint8Array
(
message
),
false
];
return
(
x
&
z
)
|
(
y
&
(
~
z
));
}
}
if
(
!
isArray
(
message
)
&&
!
isView
(
message
))
{
function
md5_H
(
x
,
y
,
z
)
{
throw
new
Error
(
INPUT_ERROR
);
return
(
x
^
y
^
z
);
}
}
return
[
message
,
false
];
function
md5_I
(
x
,
y
,
z
)
{
}
return
(
y
^
(
x
|
(
~
z
)));
/**
* @method hex
* @memberof md5
* @description Output hash as hex string
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {String} Hex string
* @example
* md5.hex('The quick brown fox jumps over the lazy dog');
* // equal to
* md5('The quick brown fox jumps over the lazy dog');
*/
/**
* @method digest
* @memberof md5
* @description Output hash as bytes array
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {Array} Bytes array
* @example
* md5.digest('The quick brown fox jumps over the lazy dog');
*/
/**
* @method array
* @memberof md5
* @description Output hash as bytes array
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {Array} Bytes array
* @example
* md5.array('The quick brown fox jumps over the lazy dog');
*/
/**
* @method arrayBuffer
* @memberof md5
* @description Output hash as ArrayBuffer
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {ArrayBuffer} ArrayBuffer
* @example
* md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
*/
/**
* @method buffer
* @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
* @memberof md5
* @description Output hash as ArrayBuffer
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {ArrayBuffer} ArrayBuffer
* @example
* md5.buffer('The quick brown fox jumps over the lazy dog');
*/
/**
* @method base64
* @memberof md5
* @description Output hash as base64 string
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {String} base64 string
* @example
* md5.base64('The quick brown fox jumps over the lazy dog');
*/
var
createOutputMethod
=
function
(
outputType
)
{
return
function
(
message
)
{
return
new
Md5
(
true
).
update
(
message
)[
outputType
]();
};
};
/**
* @method create
* @memberof md5
* @description Create Md5 object
* @returns {Md5} Md5 object.
* @example
* var hash = md5.create();
*/
/**
* @method update
* @memberof md5
* @description Create and update Md5 object
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {Md5} Md5 object.
* @example
* var hash = md5.update('The quick brown fox jumps over the lazy dog');
* // equal to
* var hash = md5.create();
* hash.update('The quick brown fox jumps over the lazy dog');
*/
var
createMethod
=
function
()
{
var
method
=
createOutputMethod
(
'hex'
);
if
(
NODE_JS
)
{
method
=
nodeWrap
(
method
);
}
}
method
.
create
=
function
()
{
function
md5_FF
(
a
,
b
,
c
,
d
,
x
,
s
,
ac
)
{
return
new
Md5
();
a
=
md5_AddUnsigned
(
a
,
md5_AddUnsigned
(
md5_AddUnsigned
(
md5_F
(
b
,
c
,
d
),
x
),
ac
));
return
md5_AddUnsigned
(
md5_RotateLeft
(
a
,
s
),
b
);
};
};
method
.
update
=
function
(
message
)
{
function
md5_GG
(
a
,
b
,
c
,
d
,
x
,
s
,
ac
)
{
return
method
.
create
().
update
(
message
);
a
=
md5_AddUnsigned
(
a
,
md5_AddUnsigned
(
md5_AddUnsigned
(
md5_G
(
b
,
c
,
d
),
x
),
ac
));
return
md5_AddUnsigned
(
md5_RotateLeft
(
a
,
s
),
b
);
};
};
for
(
var
i
=
0
;
i
<
OUTPUT_TYPES
.
length
;
++
i
)
{
function
md5_HH
(
a
,
b
,
c
,
d
,
x
,
s
,
ac
)
{
var
type
=
OUTPUT_TYPES
[
i
];
a
=
md5_AddUnsigned
(
a
,
md5_AddUnsigned
(
md5_AddUnsigned
(
md5_H
(
b
,
c
,
d
),
x
),
ac
));
method
[
type
]
=
createOutputMethod
(
type
);
return
md5_AddUnsigned
(
md5_RotateLeft
(
a
,
s
),
b
);
}
return
method
;
};
var
nodeWrap
=
function
(
method
)
{
var
crypto
=
require
(
'crypto'
)
var
Buffer
=
require
(
'buffer'
).
Buffer
;
var
bufferFrom
;
if
(
Buffer
.
from
&&
!
root
.
JS_MD5_NO_BUFFER_FROM
)
{
bufferFrom
=
Buffer
.
from
;
}
else
{
bufferFrom
=
function
(
message
)
{
return
new
Buffer
(
message
);
};
}
var
nodeMethod
=
function
(
message
)
{
if
(
typeof
message
===
'string'
)
{
return
crypto
.
createHash
(
'md5'
).
update
(
message
,
'utf8'
).
digest
(
'hex'
);
}
else
{
if
(
message
===
null
||
message
===
undefined
)
{
throw
new
Error
(
INPUT_ERROR
);
}
else
if
(
message
.
constructor
===
ArrayBuffer
)
{
message
=
new
Uint8Array
(
message
);
}
}
if
(
isArray
(
message
)
||
isView
(
message
)
||
message
.
constructor
===
Buffer
)
{
return
crypto
.
createHash
(
'md5'
).
update
(
bufferFrom
(
message
)).
digest
(
'hex'
);
}
else
{
return
method
(
message
);
}
};
};
return
nodeMethod
;
function
md5_II
(
a
,
b
,
c
,
d
,
x
,
s
,
ac
)
{
};
a
=
md5_AddUnsigned
(
a
,
md5_AddUnsigned
(
md5_AddUnsigned
(
md5_I
(
b
,
c
,
d
),
x
),
ac
));
return
md5_AddUnsigned
(
md5_RotateLeft
(
a
,
s
),
b
);
/**
* @namespace md5.hmac
*/
/**
* @method hex
* @memberof md5.hmac
* @description Output hash as hex string
* @param {String|Array|Uint8Array|ArrayBuffer} key key
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {String} Hex string
* @example
* md5.hmac.hex('key', 'The quick brown fox jumps over the lazy dog');
* // equal to
* md5.hmac('key', 'The quick brown fox jumps over the lazy dog');
*/
/**
* @method digest
* @memberof md5.hmac
* @description Output hash as bytes array
* @param {String|Array|Uint8Array|ArrayBuffer} key key
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {Array} Bytes array
* @example
* md5.hmac.digest('key', 'The quick brown fox jumps over the lazy dog');
*/
/**
* @method array
* @memberof md5.hmac
* @description Output hash as bytes array
* @param {String|Array|Uint8Array|ArrayBuffer} key key
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {Array} Bytes array
* @example
* md5.hmac.array('key', 'The quick brown fox jumps over the lazy dog');
*/
/**
* @method arrayBuffer
* @memberof md5.hmac
* @description Output hash as ArrayBuffer
* @param {String|Array|Uint8Array|ArrayBuffer} key key
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {ArrayBuffer} ArrayBuffer
* @example
* md5.hmac.arrayBuffer('key', 'The quick brown fox jumps over the lazy dog');
*/
/**
* @method buffer
* @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
* @memberof md5.hmac
* @description Output hash as ArrayBuffer
* @param {String|Array|Uint8Array|ArrayBuffer} key key
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {ArrayBuffer} ArrayBuffer
* @example
* md5.hmac.buffer('key', 'The quick brown fox jumps over the lazy dog');
*/
/**
* @method base64
* @memberof md5.hmac
* @description Output hash as base64 string
* @param {String|Array|Uint8Array|ArrayBuffer} key key
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {String} base64 string
* @example
* md5.hmac.base64('key', 'The quick brown fox jumps over the lazy dog');
*/
var
createHmacOutputMethod
=
function
(
outputType
)
{
return
function
(
key
,
message
)
{
return
new
HmacMd5
(
key
,
true
).
update
(
message
)[
outputType
]();
};
};
};
function
md5_ConvertToWordArray
(
string
)
{
var
lWordCount
;
/**
var
lMessageLength
=
string
.
length
;
* @method create
var
lNumberOfWords_temp1
=
lMessageLength
+
8
;
* @memberof md5.hmac
var
lNumberOfWords_temp2
=
(
lNumberOfWords_temp1
-
(
lNumberOfWords_temp1
%
64
))
/
64
;
* @description Create HmacMd5 object
var
lNumberOfWords
=
(
lNumberOfWords_temp2
+
1
)
*
16
;
* @param {String|Array|Uint8Array|ArrayBuffer} key key
var
lWordArray
=
Array
(
lNumberOfWords
-
1
);
* @returns {HmacMd5} HmacMd5 object.
var
lBytePosition
=
0
;
* @example
var
lByteCount
=
0
;
* var hash = md5.hmac.create('key');
while
(
lByteCount
<
lMessageLength
)
{
*/
lWordCount
=
(
lByteCount
-
(
lByteCount
%
4
))
/
4
;
/**
lBytePosition
=
(
lByteCount
%
4
)
*
8
;
* @method update
lWordArray
[
lWordCount
]
=
(
lWordArray
[
lWordCount
]
|
(
string
.
charCodeAt
(
lByteCount
)
<<
lBytePosition
));
* @memberof md5.hmac
lByteCount
++
;
* @description Create and update HmacMd5 object
}
* @param {String|Array|Uint8Array|ArrayBuffer} key key
lWordCount
=
(
lByteCount
-
(
lByteCount
%
4
))
/
4
;
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
lBytePosition
=
(
lByteCount
%
4
)
*
8
;
* @returns {HmacMd5} HmacMd5 object.
lWordArray
[
lWordCount
]
=
lWordArray
[
lWordCount
]
|
(
0x80
<<
lBytePosition
);
* @example
lWordArray
[
lNumberOfWords
-
2
]
=
lMessageLength
<<
3
;
* var hash = md5.hmac.update('key', 'The quick brown fox jumps over the lazy dog');
lWordArray
[
lNumberOfWords
-
1
]
=
lMessageLength
>>>
29
;
* // equal to
return
lWordArray
;
* var hash = md5.hmac.create('key');
* hash.update('The quick brown fox jumps over the lazy dog');
*/
var
createHmacMethod
=
function
()
{
var
method
=
createHmacOutputMethod
(
'hex'
);
method
.
create
=
function
(
key
)
{
return
new
HmacMd5
(
key
);
};
};
method
.
update
=
function
(
key
,
message
)
{
function
md5_WordToHex
(
lValue
)
{
return
method
.
create
(
key
).
update
(
message
);
var
WordToHexValue
=
""
,
WordToHexValue_temp
=
""
,
lByte
,
lCount
;
for
(
lCount
=
0
;
lCount
<=
3
;
lCount
++
)
{
lByte
=
(
lValue
>>>
(
lCount
*
8
))
&
255
;
WordToHexValue_temp
=
"0"
+
lByte
.
toString
(
16
);
WordToHexValue
=
WordToHexValue
+
WordToHexValue_temp
.
substr
(
WordToHexValue_temp
.
length
-
2
,
2
);
}
return
WordToHexValue
;
};
};
for
(
var
i
=
0
;
i
<
OUTPUT_TYPES
.
length
;
++
i
)
{
function
md5_Utf8Encode
(
string
)
{
var
type
=
OUTPUT_TYPES
[
i
];
string
=
string
.
replace
(
/
\r\n
/g
,
"
\n
"
);
method
[
type
]
=
createHmacOutputMethod
(
type
);
var
utftext
=
""
;
}
for
(
var
n
=
0
;
n
<
string
.
length
;
n
++
)
{
return
method
;
var
c
=
string
.
charCodeAt
(
n
);
};
if
(
c
<
128
)
{
utftext
+=
String
.
fromCharCode
(
c
);
/**
}
else
if
((
c
>
127
)
&&
(
c
<
2048
))
{
* Md5 class
utftext
+=
String
.
fromCharCode
((
c
>>
6
)
|
192
);
* @class Md5
utftext
+=
String
.
fromCharCode
((
c
&
63
)
|
128
);
* @description This is internal class.
* @see {@link md5.create}
*/
function
Md5
(
sharedMemory
)
{
if
(
sharedMemory
)
{
blocks
[
0
]
=
blocks
[
16
]
=
blocks
[
1
]
=
blocks
[
2
]
=
blocks
[
3
]
=
blocks
[
4
]
=
blocks
[
5
]
=
blocks
[
6
]
=
blocks
[
7
]
=
blocks
[
8
]
=
blocks
[
9
]
=
blocks
[
10
]
=
blocks
[
11
]
=
blocks
[
12
]
=
blocks
[
13
]
=
blocks
[
14
]
=
blocks
[
15
]
=
0
;
this
.
blocks
=
blocks
;
this
.
buffer8
=
buffer8
;
}
else
{
if
(
ARRAY_BUFFER
)
{
var
buffer
=
new
ArrayBuffer
(
68
);
this
.
buffer8
=
new
Uint8Array
(
buffer
);
this
.
blocks
=
new
Uint32Array
(
buffer
);
}
else
{
this
.
blocks
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
];
}
}
this
.
h0
=
this
.
h1
=
this
.
h2
=
this
.
h3
=
this
.
start
=
this
.
bytes
=
this
.
hBytes
=
0
;
this
.
finalized
=
this
.
hashed
=
false
;
this
.
first
=
true
;
}
/**
* @method update
* @memberof Md5
* @instance
* @description Update hash
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {Md5} Md5 object.
* @see {@link md5.update}
*/
Md5
.
prototype
.
update
=
function
(
message
)
{
if
(
this
.
finalized
)
{
throw
new
Error
(
FINALIZE_ERROR
);
}
var
result
=
formatMessage
(
message
);
message
=
result
[
0
];
var
isString
=
result
[
1
];
var
code
,
index
=
0
,
i
,
length
=
message
.
length
,
blocks
=
this
.
blocks
;
var
buffer8
=
this
.
buffer8
;
while
(
index
<
length
)
{
if
(
this
.
hashed
)
{
this
.
hashed
=
false
;
blocks
[
0
]
=
blocks
[
16
];
blocks
[
16
]
=
blocks
[
1
]
=
blocks
[
2
]
=
blocks
[
3
]
=
blocks
[
4
]
=
blocks
[
5
]
=
blocks
[
6
]
=
blocks
[
7
]
=
blocks
[
8
]
=
blocks
[
9
]
=
blocks
[
10
]
=
blocks
[
11
]
=
blocks
[
12
]
=
blocks
[
13
]
=
blocks
[
14
]
=
blocks
[
15
]
=
0
;
}
if
(
isString
)
{
if
(
ARRAY_BUFFER
)
{
for
(
i
=
this
.
start
;
index
<
length
&&
i
<
64
;
++
index
)
{
code
=
message
.
charCodeAt
(
index
);
if
(
code
<
0x80
)
{
buffer8
[
i
++
]
=
code
;
}
else
if
(
code
<
0x800
)
{
buffer8
[
i
++
]
=
0xc0
|
(
code
>>>
6
);
buffer8
[
i
++
]
=
0x80
|
(
code
&
0x3f
);
}
else
if
(
code
<
0xd800
||
code
>=
0xe000
)
{
buffer8
[
i
++
]
=
0xe0
|
(
code
>>>
12
);
buffer8
[
i
++
]
=
0x80
|
((
code
>>>
6
)
&
0x3f
);
buffer8
[
i
++
]
=
0x80
|
(
code
&
0x3f
);
}
else
{
}
else
{
utftext
+=
String
.
fromCharCode
((
c
>>
12
)
|
224
);
code
=
0x10000
+
(((
code
&
0x3ff
)
<<
10
)
|
(
message
.
charCodeAt
(
++
index
)
&
0x3ff
));
utftext
+=
String
.
fromCharCode
(((
c
>>
6
)
&
63
)
|
128
);
buffer8
[
i
++
]
=
0xf0
|
(
code
>>>
18
);
utftext
+=
String
.
fromCharCode
((
c
&
63
)
|
128
);
buffer8
[
i
++
]
=
0x80
|
((
code
>>>
12
)
&
0x3f
);
buffer8
[
i
++
]
=
0x80
|
((
code
>>>
6
)
&
0x3f
);
buffer8
[
i
++
]
=
0x80
|
(
code
&
0x3f
);
}
}
}
}
else
{
for
(
i
=
this
.
start
;
index
<
length
&&
i
<
64
;
++
index
)
{
code
=
message
.
charCodeAt
(
index
);
if
(
code
<
0x80
)
{
blocks
[
i
>>>
2
]
|=
code
<<
SHIFT
[
i
++
&
3
];
}
else
if
(
code
<
0x800
)
{
blocks
[
i
>>>
2
]
|=
(
0xc0
|
(
code
>>>
6
))
<<
SHIFT
[
i
++
&
3
];
blocks
[
i
>>>
2
]
|=
(
0x80
|
(
code
&
0x3f
))
<<
SHIFT
[
i
++
&
3
];
}
else
if
(
code
<
0xd800
||
code
>=
0xe000
)
{
blocks
[
i
>>>
2
]
|=
(
0xe0
|
(
code
>>>
12
))
<<
SHIFT
[
i
++
&
3
];
blocks
[
i
>>>
2
]
|=
(
0x80
|
((
code
>>>
6
)
&
0x3f
))
<<
SHIFT
[
i
++
&
3
];
blocks
[
i
>>>
2
]
|=
(
0x80
|
(
code
&
0x3f
))
<<
SHIFT
[
i
++
&
3
];
}
else
{
code
=
0x10000
+
(((
code
&
0x3ff
)
<<
10
)
|
(
message
.
charCodeAt
(
++
index
)
&
0x3ff
));
blocks
[
i
>>>
2
]
|=
(
0xf0
|
(
code
>>>
18
))
<<
SHIFT
[
i
++
&
3
];
blocks
[
i
>>>
2
]
|=
(
0x80
|
((
code
>>>
12
)
&
0x3f
))
<<
SHIFT
[
i
++
&
3
];
blocks
[
i
>>>
2
]
|=
(
0x80
|
((
code
>>>
6
)
&
0x3f
))
<<
SHIFT
[
i
++
&
3
];
blocks
[
i
>>>
2
]
|=
(
0x80
|
(
code
&
0x3f
))
<<
SHIFT
[
i
++
&
3
];
}
}
}
}
return
utftext
;
}
else
{
};
if
(
ARRAY_BUFFER
)
{
var
x
=
Array
();
for
(
i
=
this
.
start
;
index
<
length
&&
i
<
64
;
++
index
)
{
var
k
,
AA
,
BB
,
CC
,
DD
,
a
,
b
,
c
,
d
;
buffer8
[
i
++
]
=
message
[
index
];
var
S11
=
7
,
S12
=
12
,
S13
=
17
,
S14
=
22
;
}
var
S21
=
5
,
S22
=
9
,
S23
=
14
,
S24
=
20
;
}
else
{
var
S31
=
4
,
S32
=
11
,
S33
=
16
,
S34
=
23
;
for
(
i
=
this
.
start
;
index
<
length
&&
i
<
64
;
++
index
)
{
var
S41
=
6
,
S42
=
10
,
S43
=
15
,
S44
=
21
;
blocks
[
i
>>>
2
]
|=
message
[
index
]
<<
SHIFT
[
i
++
&
3
];
string
=
md5_Utf8Encode
(
string
);
}
x
=
md5_ConvertToWordArray
(
string
);
}
a
=
0x67452301
;
}
b
=
0xEFCDAB89
;
this
.
lastByteIndex
=
i
;
c
=
0x98BADCFE
;
this
.
bytes
+=
i
-
this
.
start
;
d
=
0x10325476
;
if
(
i
>=
64
)
{
for
(
k
=
0
;
k
<
x
.
length
;
k
+=
16
)
{
this
.
start
=
i
-
64
;
AA
=
a
;
this
.
hash
();
BB
=
b
;
this
.
hashed
=
true
;
CC
=
c
;
}
else
{
DD
=
d
;
this
.
start
=
i
;
a
=
md5_FF
(
a
,
b
,
c
,
d
,
x
[
k
+
0
],
S11
,
0xD76AA478
);
}
d
=
md5_FF
(
d
,
a
,
b
,
c
,
x
[
k
+
1
],
S12
,
0xE8C7B756
);
}
c
=
md5_FF
(
c
,
d
,
a
,
b
,
x
[
k
+
2
],
S13
,
0x242070DB
);
if
(
this
.
bytes
>
4294967295
)
{
b
=
md5_FF
(
b
,
c
,
d
,
a
,
x
[
k
+
3
],
S14
,
0xC1BDCEEE
);
this
.
hBytes
+=
this
.
bytes
/
4294967296
<<
0
;
a
=
md5_FF
(
a
,
b
,
c
,
d
,
x
[
k
+
4
],
S11
,
0xF57C0FAF
);
this
.
bytes
=
this
.
bytes
%
4294967296
;
d
=
md5_FF
(
d
,
a
,
b
,
c
,
x
[
k
+
5
],
S12
,
0x4787C62A
);
}
c
=
md5_FF
(
c
,
d
,
a
,
b
,
x
[
k
+
6
],
S13
,
0xA8304613
);
return
this
;
b
=
md5_FF
(
b
,
c
,
d
,
a
,
x
[
k
+
7
],
S14
,
0xFD469501
);
};
a
=
md5_FF
(
a
,
b
,
c
,
d
,
x
[
k
+
8
],
S11
,
0x698098D8
);
d
=
md5_FF
(
d
,
a
,
b
,
c
,
x
[
k
+
9
],
S12
,
0x8B44F7AF
);
Md5
.
prototype
.
finalize
=
function
()
{
c
=
md5_FF
(
c
,
d
,
a
,
b
,
x
[
k
+
10
],
S13
,
0xFFFF5BB1
);
if
(
this
.
finalized
)
{
b
=
md5_FF
(
b
,
c
,
d
,
a
,
x
[
k
+
11
],
S14
,
0x895CD7BE
);
return
;
a
=
md5_FF
(
a
,
b
,
c
,
d
,
x
[
k
+
12
],
S11
,
0x6B901122
);
}
d
=
md5_FF
(
d
,
a
,
b
,
c
,
x
[
k
+
13
],
S12
,
0xFD987193
);
this
.
finalized
=
true
;
c
=
md5_FF
(
c
,
d
,
a
,
b
,
x
[
k
+
14
],
S13
,
0xA679438E
);
var
blocks
=
this
.
blocks
,
i
=
this
.
lastByteIndex
;
b
=
md5_FF
(
b
,
c
,
d
,
a
,
x
[
k
+
15
],
S14
,
0x49B40821
);
blocks
[
i
>>>
2
]
|=
EXTRA
[
i
&
3
];
a
=
md5_GG
(
a
,
b
,
c
,
d
,
x
[
k
+
1
],
S21
,
0xF61E2562
);
if
(
i
>=
56
)
{
d
=
md5_GG
(
d
,
a
,
b
,
c
,
x
[
k
+
6
],
S22
,
0xC040B340
);
if
(
!
this
.
hashed
)
{
c
=
md5_GG
(
c
,
d
,
a
,
b
,
x
[
k
+
11
],
S23
,
0x265E5A51
);
this
.
hash
();
b
=
md5_GG
(
b
,
c
,
d
,
a
,
x
[
k
+
0
],
S24
,
0xE9B6C7AA
);
}
a
=
md5_GG
(
a
,
b
,
c
,
d
,
x
[
k
+
5
],
S21
,
0xD62F105D
);
blocks
[
0
]
=
blocks
[
16
];
d
=
md5_GG
(
d
,
a
,
b
,
c
,
x
[
k
+
10
],
S22
,
0x2441453
);
blocks
[
16
]
=
blocks
[
1
]
=
blocks
[
2
]
=
blocks
[
3
]
=
c
=
md5_GG
(
c
,
d
,
a
,
b
,
x
[
k
+
15
],
S23
,
0xD8A1E681
);
blocks
[
4
]
=
blocks
[
5
]
=
blocks
[
6
]
=
blocks
[
7
]
=
b
=
md5_GG
(
b
,
c
,
d
,
a
,
x
[
k
+
4
],
S24
,
0xE7D3FBC8
);
blocks
[
8
]
=
blocks
[
9
]
=
blocks
[
10
]
=
blocks
[
11
]
=
a
=
md5_GG
(
a
,
b
,
c
,
d
,
x
[
k
+
9
],
S21
,
0x21E1CDE6
);
blocks
[
12
]
=
blocks
[
13
]
=
blocks
[
14
]
=
blocks
[
15
]
=
0
;
d
=
md5_GG
(
d
,
a
,
b
,
c
,
x
[
k
+
14
],
S22
,
0xC33707D6
);
}
c
=
md5_GG
(
c
,
d
,
a
,
b
,
x
[
k
+
3
],
S23
,
0xF4D50D87
);
blocks
[
14
]
=
this
.
bytes
<<
3
;
b
=
md5_GG
(
b
,
c
,
d
,
a
,
x
[
k
+
8
],
S24
,
0x455A14ED
);
blocks
[
15
]
=
this
.
hBytes
<<
3
|
this
.
bytes
>>>
29
;
a
=
md5_GG
(
a
,
b
,
c
,
d
,
x
[
k
+
13
],
S21
,
0xA9E3E905
);
this
.
hash
();
d
=
md5_GG
(
d
,
a
,
b
,
c
,
x
[
k
+
2
],
S22
,
0xFCEFA3F8
);
};
c
=
md5_GG
(
c
,
d
,
a
,
b
,
x
[
k
+
7
],
S23
,
0x676F02D9
);
b
=
md5_GG
(
b
,
c
,
d
,
a
,
x
[
k
+
12
],
S24
,
0x8D2A4C8A
);
Md5
.
prototype
.
hash
=
function
()
{
a
=
md5_HH
(
a
,
b
,
c
,
d
,
x
[
k
+
5
],
S31
,
0xFFFA3942
);
var
a
,
b
,
c
,
d
,
bc
,
da
,
blocks
=
this
.
blocks
;
d
=
md5_HH
(
d
,
a
,
b
,
c
,
x
[
k
+
8
],
S32
,
0x8771F681
);
c
=
md5_HH
(
c
,
d
,
a
,
b
,
x
[
k
+
11
],
S33
,
0x6D9D6122
);
if
(
this
.
first
)
{
b
=
md5_HH
(
b
,
c
,
d
,
a
,
x
[
k
+
14
],
S34
,
0xFDE5380C
);
a
=
blocks
[
0
]
-
680876937
;
a
=
md5_HH
(
a
,
b
,
c
,
d
,
x
[
k
+
1
],
S31
,
0xA4BEEA44
);
a
=
(
a
<<
7
|
a
>>>
25
)
-
271733879
<<
0
;
d
=
md5_HH
(
d
,
a
,
b
,
c
,
x
[
k
+
4
],
S32
,
0x4BDECFA9
);
d
=
(
-
1732584194
^
a
&
2004318071
)
+
blocks
[
1
]
-
117830708
;
c
=
md5_HH
(
c
,
d
,
a
,
b
,
x
[
k
+
7
],
S33
,
0xF6BB4B60
);
d
=
(
d
<<
12
|
d
>>>
20
)
+
a
<<
0
;
b
=
md5_HH
(
b
,
c
,
d
,
a
,
x
[
k
+
10
],
S34
,
0xBEBFBC70
);
c
=
(
-
271733879
^
(
d
&
(
a
^
-
271733879
)))
+
blocks
[
2
]
-
1126478375
;
a
=
md5_HH
(
a
,
b
,
c
,
d
,
x
[
k
+
13
],
S31
,
0x289B7EC6
);
c
=
(
c
<<
17
|
c
>>>
15
)
+
d
<<
0
;
d
=
md5_HH
(
d
,
a
,
b
,
c
,
x
[
k
+
0
],
S32
,
0xEAA127FA
);
b
=
(
a
^
(
c
&
(
d
^
a
)))
+
blocks
[
3
]
-
1316259209
;
c
=
md5_HH
(
c
,
d
,
a
,
b
,
x
[
k
+
3
],
S33
,
0xD4EF3085
);
b
=
(
b
<<
22
|
b
>>>
10
)
+
c
<<
0
;
b
=
md5_HH
(
b
,
c
,
d
,
a
,
x
[
k
+
6
],
S34
,
0x4881D05
);
}
else
{
a
=
md5_HH
(
a
,
b
,
c
,
d
,
x
[
k
+
9
],
S31
,
0xD9D4D039
);
a
=
this
.
h0
;
d
=
md5_HH
(
d
,
a
,
b
,
c
,
x
[
k
+
12
],
S32
,
0xE6DB99E5
);
b
=
this
.
h1
;
c
=
md5_HH
(
c
,
d
,
a
,
b
,
x
[
k
+
15
],
S33
,
0x1FA27CF8
);
c
=
this
.
h2
;
b
=
md5_HH
(
b
,
c
,
d
,
a
,
x
[
k
+
2
],
S34
,
0xC4AC5665
);
d
=
this
.
h3
;
a
=
md5_II
(
a
,
b
,
c
,
d
,
x
[
k
+
0
],
S41
,
0xF4292244
);
a
+=
(
d
^
(
b
&
(
c
^
d
)))
+
blocks
[
0
]
-
680876936
;
d
=
md5_II
(
d
,
a
,
b
,
c
,
x
[
k
+
7
],
S42
,
0x432AFF97
);
a
=
(
a
<<
7
|
a
>>>
25
)
+
b
<<
0
;
c
=
md5_II
(
c
,
d
,
a
,
b
,
x
[
k
+
14
],
S43
,
0xAB9423A7
);
d
+=
(
c
^
(
a
&
(
b
^
c
)))
+
blocks
[
1
]
-
389564586
;
b
=
md5_II
(
b
,
c
,
d
,
a
,
x
[
k
+
5
],
S44
,
0xFC93A039
);
d
=
(
d
<<
12
|
d
>>>
20
)
+
a
<<
0
;
a
=
md5_II
(
a
,
b
,
c
,
d
,
x
[
k
+
12
],
S41
,
0x655B59C3
);
c
+=
(
b
^
(
d
&
(
a
^
b
)))
+
blocks
[
2
]
+
606105819
;
d
=
md5_II
(
d
,
a
,
b
,
c
,
x
[
k
+
3
],
S42
,
0x8F0CCC92
);
c
=
(
c
<<
17
|
c
>>>
15
)
+
d
<<
0
;
c
=
md5_II
(
c
,
d
,
a
,
b
,
x
[
k
+
10
],
S43
,
0xFFEFF47D
);
b
+=
(
a
^
(
c
&
(
d
^
a
)))
+
blocks
[
3
]
-
1044525330
;
b
=
md5_II
(
b
,
c
,
d
,
a
,
x
[
k
+
1
],
S44
,
0x85845DD1
);
b
=
(
b
<<
22
|
b
>>>
10
)
+
c
<<
0
;
a
=
md5_II
(
a
,
b
,
c
,
d
,
x
[
k
+
8
],
S41
,
0x6FA87E4F
);
}
d
=
md5_II
(
d
,
a
,
b
,
c
,
x
[
k
+
15
],
S42
,
0xFE2CE6E0
);
c
=
md5_II
(
c
,
d
,
a
,
b
,
x
[
k
+
6
],
S43
,
0xA3014314
);
a
+=
(
d
^
(
b
&
(
c
^
d
)))
+
blocks
[
4
]
-
176418897
;
b
=
md5_II
(
b
,
c
,
d
,
a
,
x
[
k
+
13
],
S44
,
0x4E0811A1
);
a
=
(
a
<<
7
|
a
>>>
25
)
+
b
<<
0
;
a
=
md5_II
(
a
,
b
,
c
,
d
,
x
[
k
+
4
],
S41
,
0xF7537E82
);
d
+=
(
c
^
(
a
&
(
b
^
c
)))
+
blocks
[
5
]
+
1200080426
;
d
=
md5_II
(
d
,
a
,
b
,
c
,
x
[
k
+
11
],
S42
,
0xBD3AF235
);
d
=
(
d
<<
12
|
d
>>>
20
)
+
a
<<
0
;
c
=
md5_II
(
c
,
d
,
a
,
b
,
x
[
k
+
2
],
S43
,
0x2AD7D2BB
);
c
+=
(
b
^
(
d
&
(
a
^
b
)))
+
blocks
[
6
]
-
1473231341
;
b
=
md5_II
(
b
,
c
,
d
,
a
,
x
[
k
+
9
],
S44
,
0xEB86D391
);
c
=
(
c
<<
17
|
c
>>>
15
)
+
d
<<
0
;
a
=
md5_AddUnsigned
(
a
,
AA
);
b
+=
(
a
^
(
c
&
(
d
^
a
)))
+
blocks
[
7
]
-
45705983
;
b
=
md5_AddUnsigned
(
b
,
BB
);
b
=
(
b
<<
22
|
b
>>>
10
)
+
c
<<
0
;
c
=
md5_AddUnsigned
(
c
,
CC
);
a
+=
(
d
^
(
b
&
(
c
^
d
)))
+
blocks
[
8
]
+
1770035416
;
d
=
md5_AddUnsigned
(
d
,
DD
);
a
=
(
a
<<
7
|
a
>>>
25
)
+
b
<<
0
;
}
d
+=
(
c
^
(
a
&
(
b
^
c
)))
+
blocks
[
9
]
-
1958414417
;
return
(
md5_WordToHex
(
a
)
+
md5_WordToHex
(
b
)
+
md5_WordToHex
(
c
)
+
md5_WordToHex
(
d
)).
toLowerCase
();
d
=
(
d
<<
12
|
d
>>>
20
)
+
a
<<
0
;
c
+=
(
b
^
(
d
&
(
a
^
b
)))
+
blocks
[
10
]
-
42063
;
c
=
(
c
<<
17
|
c
>>>
15
)
+
d
<<
0
;
b
+=
(
a
^
(
c
&
(
d
^
a
)))
+
blocks
[
11
]
-
1990404162
;
b
=
(
b
<<
22
|
b
>>>
10
)
+
c
<<
0
;
a
+=
(
d
^
(
b
&
(
c
^
d
)))
+
blocks
[
12
]
+
1804603682
;
a
=
(
a
<<
7
|
a
>>>
25
)
+
b
<<
0
;
d
+=
(
c
^
(
a
&
(
b
^
c
)))
+
blocks
[
13
]
-
40341101
;
d
=
(
d
<<
12
|
d
>>>
20
)
+
a
<<
0
;
c
+=
(
b
^
(
d
&
(
a
^
b
)))
+
blocks
[
14
]
-
1502002290
;
c
=
(
c
<<
17
|
c
>>>
15
)
+
d
<<
0
;
b
+=
(
a
^
(
c
&
(
d
^
a
)))
+
blocks
[
15
]
+
1236535329
;
b
=
(
b
<<
22
|
b
>>>
10
)
+
c
<<
0
;
a
+=
(
c
^
(
d
&
(
b
^
c
)))
+
blocks
[
1
]
-
165796510
;
a
=
(
a
<<
5
|
a
>>>
27
)
+
b
<<
0
;
d
+=
(
b
^
(
c
&
(
a
^
b
)))
+
blocks
[
6
]
-
1069501632
;
d
=
(
d
<<
9
|
d
>>>
23
)
+
a
<<
0
;
c
+=
(
a
^
(
b
&
(
d
^
a
)))
+
blocks
[
11
]
+
643717713
;
c
=
(
c
<<
14
|
c
>>>
18
)
+
d
<<
0
;
b
+=
(
d
^
(
a
&
(
c
^
d
)))
+
blocks
[
0
]
-
373897302
;
b
=
(
b
<<
20
|
b
>>>
12
)
+
c
<<
0
;
a
+=
(
c
^
(
d
&
(
b
^
c
)))
+
blocks
[
5
]
-
701558691
;
a
=
(
a
<<
5
|
a
>>>
27
)
+
b
<<
0
;
d
+=
(
b
^
(
c
&
(
a
^
b
)))
+
blocks
[
10
]
+
38016083
;
d
=
(
d
<<
9
|
d
>>>
23
)
+
a
<<
0
;
c
+=
(
a
^
(
b
&
(
d
^
a
)))
+
blocks
[
15
]
-
660478335
;
c
=
(
c
<<
14
|
c
>>>
18
)
+
d
<<
0
;
b
+=
(
d
^
(
a
&
(
c
^
d
)))
+
blocks
[
4
]
-
405537848
;
b
=
(
b
<<
20
|
b
>>>
12
)
+
c
<<
0
;
a
+=
(
c
^
(
d
&
(
b
^
c
)))
+
blocks
[
9
]
+
568446438
;
a
=
(
a
<<
5
|
a
>>>
27
)
+
b
<<
0
;
d
+=
(
b
^
(
c
&
(
a
^
b
)))
+
blocks
[
14
]
-
1019803690
;
d
=
(
d
<<
9
|
d
>>>
23
)
+
a
<<
0
;
c
+=
(
a
^
(
b
&
(
d
^
a
)))
+
blocks
[
3
]
-
187363961
;
c
=
(
c
<<
14
|
c
>>>
18
)
+
d
<<
0
;
b
+=
(
d
^
(
a
&
(
c
^
d
)))
+
blocks
[
8
]
+
1163531501
;
b
=
(
b
<<
20
|
b
>>>
12
)
+
c
<<
0
;
a
+=
(
c
^
(
d
&
(
b
^
c
)))
+
blocks
[
13
]
-
1444681467
;
a
=
(
a
<<
5
|
a
>>>
27
)
+
b
<<
0
;
d
+=
(
b
^
(
c
&
(
a
^
b
)))
+
blocks
[
2
]
-
51403784
;
d
=
(
d
<<
9
|
d
>>>
23
)
+
a
<<
0
;
c
+=
(
a
^
(
b
&
(
d
^
a
)))
+
blocks
[
7
]
+
1735328473
;
c
=
(
c
<<
14
|
c
>>>
18
)
+
d
<<
0
;
b
+=
(
d
^
(
a
&
(
c
^
d
)))
+
blocks
[
12
]
-
1926607734
;
b
=
(
b
<<
20
|
b
>>>
12
)
+
c
<<
0
;
bc
=
b
^
c
;
a
+=
(
bc
^
d
)
+
blocks
[
5
]
-
378558
;
a
=
(
a
<<
4
|
a
>>>
28
)
+
b
<<
0
;
d
+=
(
bc
^
a
)
+
blocks
[
8
]
-
2022574463
;
d
=
(
d
<<
11
|
d
>>>
21
)
+
a
<<
0
;
da
=
d
^
a
;
c
+=
(
da
^
b
)
+
blocks
[
11
]
+
1839030562
;
c
=
(
c
<<
16
|
c
>>>
16
)
+
d
<<
0
;
b
+=
(
da
^
c
)
+
blocks
[
14
]
-
35309556
;
b
=
(
b
<<
23
|
b
>>>
9
)
+
c
<<
0
;
bc
=
b
^
c
;
a
+=
(
bc
^
d
)
+
blocks
[
1
]
-
1530992060
;
a
=
(
a
<<
4
|
a
>>>
28
)
+
b
<<
0
;
d
+=
(
bc
^
a
)
+
blocks
[
4
]
+
1272893353
;
d
=
(
d
<<
11
|
d
>>>
21
)
+
a
<<
0
;
da
=
d
^
a
;
c
+=
(
da
^
b
)
+
blocks
[
7
]
-
155497632
;
c
=
(
c
<<
16
|
c
>>>
16
)
+
d
<<
0
;
b
+=
(
da
^
c
)
+
blocks
[
10
]
-
1094730640
;
b
=
(
b
<<
23
|
b
>>>
9
)
+
c
<<
0
;
bc
=
b
^
c
;
a
+=
(
bc
^
d
)
+
blocks
[
13
]
+
681279174
;
a
=
(
a
<<
4
|
a
>>>
28
)
+
b
<<
0
;
d
+=
(
bc
^
a
)
+
blocks
[
0
]
-
358537222
;
d
=
(
d
<<
11
|
d
>>>
21
)
+
a
<<
0
;
da
=
d
^
a
;
c
+=
(
da
^
b
)
+
blocks
[
3
]
-
722521979
;
c
=
(
c
<<
16
|
c
>>>
16
)
+
d
<<
0
;
b
+=
(
da
^
c
)
+
blocks
[
6
]
+
76029189
;
b
=
(
b
<<
23
|
b
>>>
9
)
+
c
<<
0
;
bc
=
b
^
c
;
a
+=
(
bc
^
d
)
+
blocks
[
9
]
-
640364487
;
a
=
(
a
<<
4
|
a
>>>
28
)
+
b
<<
0
;
d
+=
(
bc
^
a
)
+
blocks
[
12
]
-
421815835
;
d
=
(
d
<<
11
|
d
>>>
21
)
+
a
<<
0
;
da
=
d
^
a
;
c
+=
(
da
^
b
)
+
blocks
[
15
]
+
530742520
;
c
=
(
c
<<
16
|
c
>>>
16
)
+
d
<<
0
;
b
+=
(
da
^
c
)
+
blocks
[
2
]
-
995338651
;
b
=
(
b
<<
23
|
b
>>>
9
)
+
c
<<
0
;
a
+=
(
c
^
(
b
|
~
d
))
+
blocks
[
0
]
-
198630844
;
a
=
(
a
<<
6
|
a
>>>
26
)
+
b
<<
0
;
d
+=
(
b
^
(
a
|
~
c
))
+
blocks
[
7
]
+
1126891415
;
d
=
(
d
<<
10
|
d
>>>
22
)
+
a
<<
0
;
c
+=
(
a
^
(
d
|
~
b
))
+
blocks
[
14
]
-
1416354905
;
c
=
(
c
<<
15
|
c
>>>
17
)
+
d
<<
0
;
b
+=
(
d
^
(
c
|
~
a
))
+
blocks
[
5
]
-
57434055
;
b
=
(
b
<<
21
|
b
>>>
11
)
+
c
<<
0
;
a
+=
(
c
^
(
b
|
~
d
))
+
blocks
[
12
]
+
1700485571
;
a
=
(
a
<<
6
|
a
>>>
26
)
+
b
<<
0
;
d
+=
(
b
^
(
a
|
~
c
))
+
blocks
[
3
]
-
1894986606
;
d
=
(
d
<<
10
|
d
>>>
22
)
+
a
<<
0
;
c
+=
(
a
^
(
d
|
~
b
))
+
blocks
[
10
]
-
1051523
;
c
=
(
c
<<
15
|
c
>>>
17
)
+
d
<<
0
;
b
+=
(
d
^
(
c
|
~
a
))
+
blocks
[
1
]
-
2054922799
;
b
=
(
b
<<
21
|
b
>>>
11
)
+
c
<<
0
;
a
+=
(
c
^
(
b
|
~
d
))
+
blocks
[
8
]
+
1873313359
;
a
=
(
a
<<
6
|
a
>>>
26
)
+
b
<<
0
;
d
+=
(
b
^
(
a
|
~
c
))
+
blocks
[
15
]
-
30611744
;
d
=
(
d
<<
10
|
d
>>>
22
)
+
a
<<
0
;
c
+=
(
a
^
(
d
|
~
b
))
+
blocks
[
6
]
-
1560198380
;
c
=
(
c
<<
15
|
c
>>>
17
)
+
d
<<
0
;
b
+=
(
d
^
(
c
|
~
a
))
+
blocks
[
13
]
+
1309151649
;
b
=
(
b
<<
21
|
b
>>>
11
)
+
c
<<
0
;
a
+=
(
c
^
(
b
|
~
d
))
+
blocks
[
4
]
-
145523070
;
a
=
(
a
<<
6
|
a
>>>
26
)
+
b
<<
0
;
d
+=
(
b
^
(
a
|
~
c
))
+
blocks
[
11
]
-
1120210379
;
d
=
(
d
<<
10
|
d
>>>
22
)
+
a
<<
0
;
c
+=
(
a
^
(
d
|
~
b
))
+
blocks
[
2
]
+
718787259
;
c
=
(
c
<<
15
|
c
>>>
17
)
+
d
<<
0
;
b
+=
(
d
^
(
c
|
~
a
))
+
blocks
[
9
]
-
343485551
;
b
=
(
b
<<
21
|
b
>>>
11
)
+
c
<<
0
;
if
(
this
.
first
)
{
this
.
h0
=
a
+
1732584193
<<
0
;
this
.
h1
=
b
-
271733879
<<
0
;
this
.
h2
=
c
-
1732584194
<<
0
;
this
.
h3
=
d
+
271733878
<<
0
;
this
.
first
=
false
;
}
else
{
this
.
h0
=
this
.
h0
+
a
<<
0
;
this
.
h1
=
this
.
h1
+
b
<<
0
;
this
.
h2
=
this
.
h2
+
c
<<
0
;
this
.
h3
=
this
.
h3
+
d
<<
0
;
}
};
/**
* @method hex
* @memberof Md5
* @instance
* @description Output hash as hex string
* @returns {String} Hex string
* @see {@link md5.hex}
* @example
* hash.hex();
*/
Md5
.
prototype
.
hex
=
function
()
{
this
.
finalize
();
var
h0
=
this
.
h0
,
h1
=
this
.
h1
,
h2
=
this
.
h2
,
h3
=
this
.
h3
;
return
HEX_CHARS
[(
h0
>>>
4
)
&
0x0F
]
+
HEX_CHARS
[
h0
&
0x0F
]
+
HEX_CHARS
[(
h0
>>>
12
)
&
0x0F
]
+
HEX_CHARS
[(
h0
>>>
8
)
&
0x0F
]
+
HEX_CHARS
[(
h0
>>>
20
)
&
0x0F
]
+
HEX_CHARS
[(
h0
>>>
16
)
&
0x0F
]
+
HEX_CHARS
[(
h0
>>>
28
)
&
0x0F
]
+
HEX_CHARS
[(
h0
>>>
24
)
&
0x0F
]
+
HEX_CHARS
[(
h1
>>>
4
)
&
0x0F
]
+
HEX_CHARS
[
h1
&
0x0F
]
+
HEX_CHARS
[(
h1
>>>
12
)
&
0x0F
]
+
HEX_CHARS
[(
h1
>>>
8
)
&
0x0F
]
+
HEX_CHARS
[(
h1
>>>
20
)
&
0x0F
]
+
HEX_CHARS
[(
h1
>>>
16
)
&
0x0F
]
+
HEX_CHARS
[(
h1
>>>
28
)
&
0x0F
]
+
HEX_CHARS
[(
h1
>>>
24
)
&
0x0F
]
+
HEX_CHARS
[(
h2
>>>
4
)
&
0x0F
]
+
HEX_CHARS
[
h2
&
0x0F
]
+
HEX_CHARS
[(
h2
>>>
12
)
&
0x0F
]
+
HEX_CHARS
[(
h2
>>>
8
)
&
0x0F
]
+
HEX_CHARS
[(
h2
>>>
20
)
&
0x0F
]
+
HEX_CHARS
[(
h2
>>>
16
)
&
0x0F
]
+
HEX_CHARS
[(
h2
>>>
28
)
&
0x0F
]
+
HEX_CHARS
[(
h2
>>>
24
)
&
0x0F
]
+
HEX_CHARS
[(
h3
>>>
4
)
&
0x0F
]
+
HEX_CHARS
[
h3
&
0x0F
]
+
HEX_CHARS
[(
h3
>>>
12
)
&
0x0F
]
+
HEX_CHARS
[(
h3
>>>
8
)
&
0x0F
]
+
HEX_CHARS
[(
h3
>>>
20
)
&
0x0F
]
+
HEX_CHARS
[(
h3
>>>
16
)
&
0x0F
]
+
HEX_CHARS
[(
h3
>>>
28
)
&
0x0F
]
+
HEX_CHARS
[(
h3
>>>
24
)
&
0x0F
];
};
/**
* @method toString
* @memberof Md5
* @instance
* @description Output hash as hex string
* @returns {String} Hex string
* @see {@link md5.hex}
* @example
* hash.toString();
*/
Md5
.
prototype
.
toString
=
Md5
.
prototype
.
hex
;
/**
* @method digest
* @memberof Md5
* @instance
* @description Output hash as bytes array
* @returns {Array} Bytes array
* @see {@link md5.digest}
* @example
* hash.digest();
*/
Md5
.
prototype
.
digest
=
function
()
{
this
.
finalize
();
var
h0
=
this
.
h0
,
h1
=
this
.
h1
,
h2
=
this
.
h2
,
h3
=
this
.
h3
;
return
[
h0
&
0xFF
,
(
h0
>>>
8
)
&
0xFF
,
(
h0
>>>
16
)
&
0xFF
,
(
h0
>>>
24
)
&
0xFF
,
h1
&
0xFF
,
(
h1
>>>
8
)
&
0xFF
,
(
h1
>>>
16
)
&
0xFF
,
(
h1
>>>
24
)
&
0xFF
,
h2
&
0xFF
,
(
h2
>>>
8
)
&
0xFF
,
(
h2
>>>
16
)
&
0xFF
,
(
h2
>>>
24
)
&
0xFF
,
h3
&
0xFF
,
(
h3
>>>
8
)
&
0xFF
,
(
h3
>>>
16
)
&
0xFF
,
(
h3
>>>
24
)
&
0xFF
];
};
/**
* @method array
* @memberof Md5
* @instance
* @description Output hash as bytes array
* @returns {Array} Bytes array
* @see {@link md5.array}
* @example
* hash.array();
*/
Md5
.
prototype
.
array
=
Md5
.
prototype
.
digest
;
/**
* @method arrayBuffer
* @memberof Md5
* @instance
* @description Output hash as ArrayBuffer
* @returns {ArrayBuffer} ArrayBuffer
* @see {@link md5.arrayBuffer}
* @example
* hash.arrayBuffer();
*/
Md5
.
prototype
.
arrayBuffer
=
function
()
{
this
.
finalize
();
var
buffer
=
new
ArrayBuffer
(
16
);
var
blocks
=
new
Uint32Array
(
buffer
);
blocks
[
0
]
=
this
.
h0
;
blocks
[
1
]
=
this
.
h1
;
blocks
[
2
]
=
this
.
h2
;
blocks
[
3
]
=
this
.
h3
;
return
buffer
;
};
/**
* @method buffer
* @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
* @memberof Md5
* @instance
* @description Output hash as ArrayBuffer
* @returns {ArrayBuffer} ArrayBuffer
* @see {@link md5.buffer}
* @example
* hash.buffer();
*/
Md5
.
prototype
.
buffer
=
Md5
.
prototype
.
arrayBuffer
;
/**
* @method base64
* @memberof Md5
* @instance
* @description Output hash as base64 string
* @returns {String} base64 string
* @see {@link md5.base64}
* @example
* hash.base64();
*/
Md5
.
prototype
.
base64
=
function
()
{
var
v1
,
v2
,
v3
,
base64Str
=
''
,
bytes
=
this
.
array
();
for
(
var
i
=
0
;
i
<
15
;)
{
v1
=
bytes
[
i
++
];
v2
=
bytes
[
i
++
];
v3
=
bytes
[
i
++
];
base64Str
+=
BASE64_ENCODE_CHAR
[
v1
>>>
2
]
+
BASE64_ENCODE_CHAR
[(
v1
<<
4
|
v2
>>>
4
)
&
63
]
+
BASE64_ENCODE_CHAR
[(
v2
<<
2
|
v3
>>>
6
)
&
63
]
+
BASE64_ENCODE_CHAR
[
v3
&
63
];
}
v1
=
bytes
[
i
];
base64Str
+=
BASE64_ENCODE_CHAR
[
v1
>>>
2
]
+
BASE64_ENCODE_CHAR
[(
v1
<<
4
)
&
63
]
+
'=='
;
return
base64Str
;
};
/**
* HmacMd5 class
* @class HmacMd5
* @extends Md5
* @description This is internal class.
* @see {@link md5.hmac.create}
*/
function
HmacMd5
(
key
,
sharedMemory
)
{
var
i
,
result
=
formatMessage
(
key
);
key
=
result
[
0
];
if
(
result
[
1
])
{
var
bytes
=
[],
length
=
key
.
length
,
index
=
0
,
code
;
for
(
i
=
0
;
i
<
length
;
++
i
)
{
code
=
key
.
charCodeAt
(
i
);
if
(
code
<
0x80
)
{
bytes
[
index
++
]
=
code
;
}
else
if
(
code
<
0x800
)
{
bytes
[
index
++
]
=
(
0xc0
|
(
code
>>>
6
));
bytes
[
index
++
]
=
(
0x80
|
(
code
&
0x3f
));
}
else
if
(
code
<
0xd800
||
code
>=
0xe000
)
{
bytes
[
index
++
]
=
(
0xe0
|
(
code
>>>
12
));
bytes
[
index
++
]
=
(
0x80
|
((
code
>>>
6
)
&
0x3f
));
bytes
[
index
++
]
=
(
0x80
|
(
code
&
0x3f
));
}
else
{
code
=
0x10000
+
(((
code
&
0x3ff
)
<<
10
)
|
(
key
.
charCodeAt
(
++
i
)
&
0x3ff
));
bytes
[
index
++
]
=
(
0xf0
|
(
code
>>>
18
));
bytes
[
index
++
]
=
(
0x80
|
((
code
>>>
12
)
&
0x3f
));
bytes
[
index
++
]
=
(
0x80
|
((
code
>>>
6
)
&
0x3f
));
bytes
[
index
++
]
=
(
0x80
|
(
code
&
0x3f
));
}
}
key
=
bytes
;
}
if
(
key
.
length
>
64
)
{
key
=
(
new
Md5
(
true
)).
update
(
key
).
array
();
}
var
oKeyPad
=
[],
iKeyPad
=
[];
for
(
i
=
0
;
i
<
64
;
++
i
)
{
var
b
=
key
[
i
]
||
0
;
oKeyPad
[
i
]
=
0x5c
^
b
;
iKeyPad
[
i
]
=
0x36
^
b
;
}
Md5
.
call
(
this
,
sharedMemory
);
this
.
update
(
iKeyPad
);
this
.
oKeyPad
=
oKeyPad
;
this
.
inner
=
true
;
this
.
sharedMemory
=
sharedMemory
;
}
HmacMd5
.
prototype
=
new
Md5
();
HmacMd5
.
prototype
.
finalize
=
function
()
{
Md5
.
prototype
.
finalize
.
call
(
this
);
if
(
this
.
inner
)
{
this
.
inner
=
false
;
var
innerHash
=
this
.
array
();
Md5
.
call
(
this
,
this
.
sharedMemory
);
this
.
update
(
this
.
oKeyPad
);
this
.
update
(
innerHash
);
Md5
.
prototype
.
finalize
.
call
(
this
);
}
};
var
exports
=
createMethod
();
exports
.
md5
=
exports
;
exports
.
md5
.
hmac
=
createHmacMethod
();
if
(
COMMON_JS
)
{
module
.
exports
=
exports
;
}
else
{
/**
* @method md5
* @description Md5 hash function, export to global in browsers.
* @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
* @returns {String} md5 hashes
* @example
* md5(''); // d41d8cd98f00b204e9800998ecf8427e
* md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
* md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
*
* // It also supports UTF-8 encoding
* md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
*
* // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
* md5([]); // d41d8cd98f00b204e9800998ecf8427e
* md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
*/
root
.
md5
=
exports
;
if
(
AMD
)
{
define
(
function
()
{
return
exports
;
});
}
}
}
})();
// module.exports = {
// md5,
// }
\ No newline at end of file
static/js/public.js
View file @
d3472e8b
...
@@ -76,10 +76,6 @@ function getHeader() {
...
@@ -76,10 +76,6 @@ function getHeader() {
<p class="tab-item" id="htjc-item"><a href='/screen/pages/htjc.html'>回弹检测</a></p>
<p class="tab-item" id="htjc-item"><a href='/screen/pages/htjc.html'>回弹检测</a></p>
<span class="icon_font icon-vertical_line"></span>
<span class="icon_font icon-vertical_line"></span>
</div>
</div>
<div class="sub-tab hiddenImportant">
<p class="tab-item" id="gjjc-item"><a href='/screen/pages/gjjc.html'>钢筋检测</a></p>
<span class="icon_font icon-vertical_line"></span>
</div>
</div>
</div>
<div class="back-item" onclick="back()">后台管理</div>
<div class="back-item" onclick="back()">后台管理</div>
<div class="user-info">
<div class="user-info">
...
@@ -93,7 +89,7 @@ function getHeader() {
...
@@ -93,7 +89,7 @@ function getHeader() {
function
getHeaderInfo
()
{
function
getHeaderInfo
()
{
$
.
ajax
({
$
.
ajax
({
url
:
"
https://jtjc.vnet1000.net
/Ajax/Screen/GetHeaderInfo.ashx"
,
url
:
"/Ajax/Screen/GetHeaderInfo.ashx"
,
type
:
"get"
,
type
:
"get"
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
...
@@ -131,7 +127,7 @@ function showPopup(url, title) {
...
@@ -131,7 +127,7 @@ function showPopup(url, title) {
type
:
2
,
type
:
2
,
shadeClose
:
true
,
shadeClose
:
true
,
maxmin
:
true
,
maxmin
:
true
,
title
:
"<p class='popup-title'>"
+
title
+
"</p>"
,
title
:
"<p class='popup-title'>"
+
title
+
"</p
>"
,
area
:
[
'9rem'
,
'6rem'
],
area
:
[
'9rem'
,
'6rem'
],
content
:
url
,
content
:
url
,
end
:
function
()
{
end
:
function
()
{
...
@@ -143,7 +139,7 @@ function showPopup(url, title) {
...
@@ -143,7 +139,7 @@ function showPopup(url, title) {
type
:
1
,
type
:
1
,
shadeClose
:
true
,
shadeClose
:
true
,
maxmin
:
true
,
maxmin
:
true
,
title
:
"<p class='popup-title'>"
+
title
+
"</p>"
,
title
:
"<p class='popup-title'>"
+
title
+
"</p
>"
,
area
:
[
'9rem'
,
'6rem'
],
area
:
[
'9rem'
,
'6rem'
],
content
:
$
(
'#popup-info'
),
content
:
$
(
'#popup-info'
),
end
:
function
()
{
end
:
function
()
{
...
@@ -153,7 +149,6 @@ function showPopup(url, title) {
...
@@ -153,7 +149,6 @@ function showPopup(url, title) {
}
}
});
});
}
}
}
}
$
(
function
()
{
$
(
function
()
{
window
.
onresize
=
function
()
{
window
.
onresize
=
function
()
{
...
@@ -171,14 +166,14 @@ $(function () {
...
@@ -171,14 +166,14 @@ $(function () {
})
})
});
});
const
imgURL
=
'
/
'
;
const
imgURL
=
''
;
const
baseURL
=
'/Ajax/Screen/Pile/'
;
const
baseURL
=
'/Ajax/Screen/Pile/'
;
const
baseURL_xcjc
=
'/Ajax/Screen/XCJC/'
;
const
baseURL_xcjc
=
'/Ajax/Screen/XCJC/'
;
const
baseURL_jzjc
=
'/Ajax/Screen/JZJC/'
;
const
baseURL_jzjc
=
'/Ajax/Screen/JZJC/'
;
const
baseURL_htjc
=
'
https://jtjc.vnet1000.net
/Ajax/Screen/HTJC/'
;
const
baseURL_htjc
=
'/Ajax/Screen/HTJC/'
;
const
baseURL_gjjc
=
'https://jtjc.vnet1000.net/Ajax/Screen/GJBHC/'
;
const
newBaseURL_htjc
=
`
${
window
.
location
.
protocol
}
//detectapi.cnjsjd.net/api/`
const
baseURL_Utility
=
'
https://jtjc.vnet1000.net
/Ajax/Screen/Utility/'
;
const
baseURL_Utility
=
'/Ajax/Screen/Utility/'
;
window
.
_AMapSecurityConfig
=
{
window
.
_AMapSecurityConfig
=
{
securityJsCode
:
'0711374220aba81dbf7515aaac08e50b'
,
securityJsCode
:
'0711374220aba81dbf7515aaac08e50b'
,
...
...
static/js/xcjc.js
View file @
d3472e8b
...
@@ -268,15 +268,11 @@ var getLeftData = {
...
@@ -268,15 +268,11 @@ var getLeftData = {
$
(
".content .left-item .panel2 .panel-info"
).
html
(
'<div class="noData">暂无数据</div>'
);
$
(
".content .left-item .panel2 .panel-info"
).
html
(
'<div class="noData">暂无数据</div>'
);
}
}
},
},
// 视频通话
// 视频通话
videoConnection
(
target_op_code
){
videoConnection
(
target_op_code
){
<<<<<<<
static
/
js
/
xcjc
.
js
window
.
open
(
'https://detect.cnjsjd.net/VideoConnection.aspx?target_op_code='
+
target_op_code
);
window
.
open
(
'https://detect.cnjsjd.net/VideoConnection.aspx?target_op_code='
+
target_op_code
);
// showPopup('http://detect.cnjsjd.net/VideoConnection.aspx?target_op_code='+target_op_code, '视频通话');
// showPopup('http://detect.cnjsjd.net/VideoConnection.aspx?target_op_code='+target_op_code, '视频通话');
}
=======
window
.
open
(
'https://detect.cnjsjd.net/VideoConnection.aspx?target_op_code='
+
target_op_code
);
>>>>>>>
static
/
js
/
xcjc
.
js
}
}
}
var
getCenterData
=
{
var
getCenterData
=
{
...
...
static/js/zjjc.js
View file @
d3472e8b
...
@@ -337,6 +337,7 @@ var getLeftdata = {
...
@@ -337,6 +337,7 @@ var getLeftdata = {
map
.
getMap
(
data
);
map
.
getMap
(
data
);
},
},
error
:
function
(
jqXHR
)
{
error
:
function
(
jqXHR
)
{
map
.
getMap
([]);
console
.
log
(
"发生错误:"
+
jqXHR
.
status
);
console
.
log
(
"发生错误:"
+
jqXHR
.
status
);
}
}
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment