mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-14 09:21:27 +00:00
新增base64_encode工具
This commit is contained in:
@@ -281,9 +281,25 @@ parse_str() {
|
||||
}
|
||||
|
||||
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() {
|
||||
[ -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.
Reference in New Issue
Block a user