This commit is contained in:
2025-03-04 08:15:50 +01:00
parent d337ce86fb
commit 451d117d9e
83 changed files with 5528 additions and 262 deletions

25
src/Helpers/Base64.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Helpers;
use Safe\Exceptions\UrlException;
class Base64
{
private function __construct()
{
}
public static function base64_url_encode(string $input): string
{
return strtr(base64_encode($input), '+/=', '-_.');
}
/** @throws UrlException */
public static function base64_url_decode(string $input): string
{
return \Safe\base64_decode(strtr($input, '-_.', '+/='), true);
}
}