Commit 7daa207d authored by Sébastien Larivière's avatar Sébastien Larivière Committed by Marc Cornellà
Browse files

Adding support for stdin input in the encode64 plugin

parent 40016afd
encode64(){ printf '%s' $1 | base64 } encode64() {
decode64(){ printf '%s' $1 | base64 --decode } if [[ $# -eq 0 ]]; then
cat | base64
else
printf '%s' $1 | base64
fi
}
decode64() {
if [[ $# -eq 0 ]]; then
cat | base64 --decode
else
printf '%s' $1 | base64 --decode
fi
}
alias e64=encode64 alias e64=encode64
alias d64=decode64 alias d64=decode64
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment