Last active
November 7, 2025 10:11
-
-
Save marchrius/e3480dd9905972997e5dce08a6a41997 to your computer and use it in GitHub Desktop.
Base64 fast encode / decode util
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Base64 fast encode / decode util | |
| function __base64_decode() { | |
| if [ "$#" > 1 ];then | |
| for arg in "$@";do | |
| echo "'$arg'"" => '"`echo "$arg" | base64 -D`"'" | |
| done | |
| else | |
| echo "$1" | base64 -D | |
| fi | |
| } | |
| function __base64_encode() { | |
| if [ "$#" > 1 ];then | |
| for arg in "$@";do | |
| echo "'$arg'"" => '"`echo "$arg" | base64`"'" | |
| done | |
| else | |
| echo "$1" | base64 | |
| fi | |
| } | |
| alias db64=__base64_decode | |
| alias eb64=__base64_encode | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment