changed urlbase64 helper to also use sed for character replacements

This commit is contained in:
Lukas Schauer
2016-01-08 20:18:31 +01:00
parent f06f764f38
commit d760890c88

View File

@@ -129,7 +129,7 @@ _exiterr() {
# Encode data as url-safe formatted base64
urlbase64() {
# urlbase64: base64 encoded string with '+' replaced with '-' and '/' replaced with '_'
openssl base64 -e | tr -d '\n\r' | sed 's/=*$//g' | tr '+/' '-_'
openssl base64 -e | tr -d '\n\r' | sed -e 's:=*$::g' -e 'y:+/:-_:'
}
# Convert hex string to binary data