Fixed capitalization, tests

This commit is contained in:
2023-04-09 02:40:21 +02:00
parent 6b1d3178cf
commit 953e831d84
25 changed files with 199 additions and 161 deletions

16
src/JWTUtil.php Normal file
View File

@ -0,0 +1,16 @@
<?php
namespace NoccyLabs\SimpleJWT;
class JWTUtil
{
public static function encode($data) {
return rtrim(str_replace(['+', '/'], ['-', '_'], base64_encode($data)), "=");
}
public static function decode($data) {
return base64_decode(str_replace(['-', '_'], ['+', '/'], $data));
}
}