summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--publish6
1 files changed, 1 insertions, 5 deletions
diff --git a/publish b/publish
index 05aed4c..2dccb18 100644
--- a/publish
+++ b/publish
@@ -48,12 +48,8 @@ uri_encode() {
perl -MURI::Escape -ne 'print uri_escape($_)'
}
-base64_encode() {
- perl -MMIME::Base64 -ne 'print encode_base64($_,'')'
-}
-
get_random() {
- head -c 128 /dev/urandom | base64_encode | sed -e 's/[^a-zA-Z0-9]//g' | head -c 16
+ head -c 8 /dev/urandom | base64 | tr '/+' '-_' | tr -d '='
}
TEST=false