|
<?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));
|
|
}
|
|
|
|
} |