summaryrefslogtreecommitdiff
path: root/includes/util/random.inc
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-03-30 23:40:33 +0100
committerRaindropsSys <raindrops@equestria.dev>2024-03-30 23:40:33 +0100
commit6b796258d413f00e498ce7f80f73a9f6c061f29c (patch)
tree49e64a5dd4cde2acff7f0a93ed3f8e20e1cb2dc8 /includes/util/random.inc
parent5860551daa0f60103ad24e93da29f401a653f144 (diff)
downloadpluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.gz
pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.bz2
pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.zip
Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated)
Diffstat (limited to 'includes/util/random.inc')
-rw-r--r--includes/util/random.inc15
1 files changed, 0 insertions, 15 deletions
diff --git a/includes/util/random.inc b/includes/util/random.inc
deleted file mode 100644
index b6e7905..0000000
--- a/includes/util/random.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * @throws Exception
- */
-function random($length = 13): string {
- if (function_exists("random_bytes")) {
- $bytes = random_bytes(ceil($length / 2));
- } elseif (function_exists("openssl_random_pseudo_bytes")) {
- $bytes = openssl_random_pseudo_bytes(ceil($length / 2));
- } else {
- throw new Exception("No cryptographically secure random function available");
- }
- return substr(bin2hex($bytes), 0, $length);
-} \ No newline at end of file