Fixed capitalization, tests
This commit is contained in:
16
src/JWTUtil.php
Normal file
16
src/JWTUtil.php
Normal 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));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user