mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-10 23:41:27 +00:00
新增base64_encode工具
This commit is contained in:
@@ -281,9 +281,25 @@ parse_str() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
base_encode() {
|
base_encode() {
|
||||||
[ -z "${1}" ] && echo -n "" || echo -n "$*" | baseutil --b64
|
if [ -z "${1}" ]; then
|
||||||
|
echo -n ""
|
||||||
|
else
|
||||||
|
if command -v base64_encode &> /dev/null; then
|
||||||
|
echo -n "$*" | base64_encode
|
||||||
|
else
|
||||||
|
echo -n "$*" | baseutil --b64
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
base_decode() {
|
base_decode() {
|
||||||
[ -z "${1}" ] && echo -n "" || echo -n "$*" | baseutil --b64 -d
|
if [ -z "${1}" ]; then
|
||||||
|
echo -n ""
|
||||||
|
else
|
||||||
|
if command -v base64_decode &> /dev/null; then
|
||||||
|
echo -n "$*" | base64_decode
|
||||||
|
else
|
||||||
|
echo -n "$*" | baseutil --b64 -d
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
1
apps/mixbox/bin/base64_decode
Normal file
1
apps/mixbox/bin/base64_decode
Normal file
@@ -0,0 +1 @@
|
|||||||
|
base64_encode
|
||||||
BIN
apps/mixbox/bin/base64_encode_linux_arm
Normal file
BIN
apps/mixbox/bin/base64_encode_linux_arm
Normal file
Binary file not shown.
BIN
apps/mixbox/bin/base64_encode_linux_mips
Normal file
BIN
apps/mixbox/bin/base64_encode_linux_mips
Normal file
Binary file not shown.
BIN
apps/mixbox/bin/base64_encode_linux_x86_64
Normal file
BIN
apps/mixbox/bin/base64_encode_linux_x86_64
Normal file
Binary file not shown.
@@ -3,5 +3,5 @@ appname="mixbox"
|
|||||||
needver=""
|
needver=""
|
||||||
supports="linux_arm,linux_mips,linux_x86_64"
|
supports="linux_arm,linux_mips,linux_x86_64"
|
||||||
appinfo="一款支持多平台,多架构的Shell工具箱"
|
appinfo="一款支持多平台,多架构的Shell工具箱"
|
||||||
newinfo="新增功能parse_str,用于解析变量,新增baseutils工具"
|
newinfo="新增base64_encode工具"
|
||||||
version="0.1.5"
|
version="0.1.6"
|
||||||
|
|||||||
Reference in New Issue
Block a user