aboutsummaryrefslogtreecommitdiffhomepage
path: root/misc/random_printable_bytes.php
diff options
context:
space:
mode:
Diffstat (limited to 'misc/random_printable_bytes.php')
-rw-r--r--misc/random_printable_bytes.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/random_printable_bytes.php b/misc/random_printable_bytes.php
index d2b8770..9e55fe7 100644
--- a/misc/random_printable_bytes.php
+++ b/misc/random_printable_bytes.php
@@ -6,5 +6,5 @@
*/
function random_printable_bytes(): string {
// i think 128 bytes should be enough .. i hope so anyway
- return base64_encode(random_bytes(128));
+ return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(128)));
} \ No newline at end of file