Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
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
HuangJunbo
antSword
Commits
2e23e9ed
Commit
2e23e9ed
authored
Apr 22, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Doc:Decoder) 添加函数注释
parent
dfe62f9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
base64.js
source/core/php/decoder/base64.js
+15
-3
default.js
source/core/php/decoder/default.js
+13
-0
No files found.
source/core/php/decoder/base64.js
View file @
2e23e9ed
/**
* php::base64解码器
* ? 利用php的base64_decode进行解码处理
*/
'use strict'
;
module
.
exports
=
{
asoutput
:
(
tag_s
,
tag_e
)
=>
{
/**
* @returns {string} asenc 将返回数据base64编码
*/
asoutput
:
()
=>
{
return
`function asenc($out){
return base64_encode($out);
return
@
base64_encode($out);
}
`
.
replace
(
/
\n\s
+/g
,
''
);
},
/**
* 解码字符串
* @param {string} data 要被解码的字符串
* @returns {string} 解码后的字符串
*/
decode_str
:
(
data
)
=>
{
return
Buffer
.
from
(
data
,
'base64'
).
toString
();
},
/**
* 解码 Buffer
* @param {string} data 要被解码的 Buffer
* @returns {string} 解码后的 Buffer
*/
decode_buff
:
(
data
)
=>
{
return
Buffer
.
from
(
data
.
toString
(),
'base64'
);
}
...
...
source/core/php/decoder/default.js
View file @
2e23e9ed
...
...
@@ -5,15 +5,28 @@
'use strict'
;
module
.
exports
=
{
/**
* @returns {string} asenc 加密返回数据的函数
*/
asoutput
:
()
=>
{
return
`function asenc($out){
return $out;
}
`
.
replace
(
/
\n\s
+/g
,
''
);
},
/**
* 解码字符串
* @param {string} data 要被解码的字符串
* @returns {string} 解码后的字符串
*/
decode_str
:
(
data
)
=>
{
return
data
;
},
/**
* 解码 Buffer
* @param {string} data 要被解码的 Buffer
* @returns {string} 解码后的 Buffer
*/
decode_buff
:
(
data
)
=>
{
return
data
;
}
...
...
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