FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
AES4ObjC-Java-JavaScript/JavaScript/test.html at master · kinrt/AES4ObjC-Java-JavaScript · GitHub
kinrt
AES4ObjC-Java-JavaScript
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
AES4ObjC-Java-JavaScript
/
JavaScript
/
test.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (26 loc) · 989 Bytes
Breadcrumbs
AES4ObjC-Java-JavaScript
/
JavaScript
/
test.html
Copy path
File metadata and controls
38 lines (26 loc) · 989 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html
>
<
html
lang
="
zh
"
>
<
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
"
>
<
script
src
="
js/aes-lib/aes.js
"
>
</
script
>
<
script
src
="
js/aes-lib/aes-cipher-wrapper.js
"
>
</
script
>
<
title
>
测试 AES 加密
</
title
>
</
head
>
<
body
>
<
script
>
console
.
log
(
'>>>>>>>>>>> 测试开始……'
)
;
const
aesWrapper
=
window
.
AESCipherWrapper
;
const
key
=
'16BytesLengthKey'
;
const
dataStr
=
"abc`~!@#$%^&*()_+-=':;<>?,./|{}[]\\\"xyz123中文"
;
console
.
log
(
'原始字符串:'
,
dataStr
)
;
console
.
log
(
'秘钥:'
,
key
)
;
var
encryptedStr
=
aesWrapper
.
encrypt
(
dataStr
,
key
)
;
console
.
log
(
'加密后得到的 Base64 字符串:'
,
encryptedStr
)
;
var
oriStr
=
aesWrapper
.
decrypt
(
encryptedStr
,
key
)
;
console
.
log
(
'解密后得到的字符串:'
,
oriStr
)
;
console
.
log
(
'<<<<<<<<<<< 测试结束!'
)
;
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL