summaryrefslogtreecommitdiff
path: root/includes/util
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-05-12 16:43:04 +0200
committerRaindropsSys <contact@minteck.org>2023-05-12 16:43:04 +0200
commit0e4f6cea6a4f8d1f860ded405a66f9fca9d93d96 (patch)
treef8dcad460d9120442e23c8c567ba246eed39f71a /includes/util
parent761c84c0c17c04113608a20e8401270023741c7e (diff)
downloadpluralconnect-0e4f6cea6a4f8d1f860ded405a66f9fca9d93d96.tar.gz
pluralconnect-0e4f6cea6a4f8d1f860ded405a66f9fca9d93d96.tar.bz2
pluralconnect-0e4f6cea6a4f8d1f860ded405a66f9fca9d93d96.zip
Updated 5 files and added 29 files (automated)
Diffstat (limited to 'includes/util')
-rw-r--r--includes/util/functions.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/util/functions.inc b/includes/util/functions.inc
index 16e2bdd..9727b51 100644
--- a/includes/util/functions.inc
+++ b/includes/util/functions.inc
@@ -23,6 +23,12 @@ if (!function_exists("formatPonypush")) {
}
}
+if (!function_exists("generateToken")) {
+ function generateToken(): string {
+ return bin2hex(random_bytes(32));
+ }
+}
+
if (!function_exists("peh_error")) {
function peh_error($message, $code = 500): void {
header("Location: /?em=" . urlencode(base64_encode($message)) . "&ec=" . $code);