mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-11 07:32:52 +02:00
changed urlbase64 helper to also use sed for character replacements
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ _exiterr() {
|
|||||||
# Encode data as url-safe formatted base64
|
# Encode data as url-safe formatted base64
|
||||||
urlbase64() {
|
urlbase64() {
|
||||||
# urlbase64: base64 encoded string with '+' replaced with '-' and '/' replaced with '_'
|
# 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
|
# Convert hex string to binary data
|
||||||
|
|||||||
Reference in New Issue
Block a user