-
-
Save debuti/a2329211febcd602cd90ea2cacae8fc3 to your computer and use it in GitHub Desktop.
Base64 multi-encoding/decoding script
This file contains 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
#!/bin/bash | |
# Source this file | |
# The output length follows an expotential sequence, the same as the computation time | |
function bex { outstr=$1; incount=$2; while [[ ! incount -eq 0 ]]; do outstr=$(echo "$outstr" | base64 -w0); (( incount-- )); done; echo $outstr; } | |
function bdx { outstr=$1; incount=$2; while [[ ! incount -eq 0 ]]; do outstr=$(echo "$outstr" | base64 -d); (( incount-- )); done; echo $outstr; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment