mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-11-16 13:51:02 +01:00
changed urlbase64 helper to also use sed for character replacements
This commit is contained in:
1 parent
f06f764f38
commit
d760890c88
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user