This commit is contained in:
Manav Rathi 2025-03-21 08:30:38 +05:30
parent 822d74b65b
commit aada6bf415
No known key found for this signature in database

View File

@ -56,10 +56,8 @@ gen_key () { head -c 32 /dev/urandom | base64 -w 0 }
# crypto_generichash_BYTES_MAX = 64 # crypto_generichash_BYTES_MAX = 64
gen_hash () { head -c 64 /dev/urandom | base64 -w 0 } gen_hash () { head -c 64 /dev/urandom | base64 -w 0 }
# Like gen_key but sodium_base64_VARIANT_URLSAFE which replaces "+/" with "-_" # Like gen_key but sodium_base64_VARIANT_URLSAFE which converts + to -, / to _
gen_jwt_secret () { gen_jwt_secret () { head -c 32 /dev/urandom | base64 -w 0 | tr '+/' '-_' }
head -c 32 /dev/urandom | base64 -w 0 | sed -e 's,+,-,g' -e 's,/,_,g'
}
replace_in_compose () { replace_in_compose () {
sed "$1" compose.yaml > compose.yaml.new sed "$1" compose.yaml > compose.yaml.new