mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-05 08:27:03 +02:00
changed urlbase64 helper to also use sed for character replacements
This commit is contained in:
@@ -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