mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 20:54:20 +01:00
Refactor Base64 encoding/decoding methods for consistency, update controller routes, and improve CI configuration
This commit is contained in:
@@ -8,15 +8,13 @@ use Safe\Exceptions\UrlException;
|
||||
|
||||
class Base64
|
||||
{
|
||||
private function __construct() {}
|
||||
|
||||
public static function base64_url_encode(string $input): string
|
||||
public static function base64UrlEncode(string $input): string
|
||||
{
|
||||
return rtrim(strtr(base64_encode($input), '+/', '-_'), '=');
|
||||
}
|
||||
|
||||
/** @throws UrlException */
|
||||
public static function base64_url_decode(string $input): string
|
||||
public static function base64UrlDecode(string $input): string
|
||||
{
|
||||
return \Safe\base64_decode(strtr($input, '-_', '+/'), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user