diff options
Diffstat (limited to 'includes/util/functions.inc')
-rw-r--r-- | includes/util/functions.inc | 6 |
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); |