Our services
Server, network, and web solutions tailored to your business.
LABORATORY
JSON Validator & Formatter
Paste JSON, validate it, and preview a clean formatted result—without reloading the page.
Paste raw JSON objects or arrays.
The formatted result will appear here after validation.
Base64 Encoder & Decoder
Convert text and Base64 strings in the browser—no page reload required.
Decoder
Paste a Base64 string to decode.
The decoded result will appear here.
Encoder
Paste text to encode—UTF-8 is supported.
The encoded string will appear here.
Encryptor & Decryptor
Encrypt or decrypt text with a custom key—based on the SKC cipher.
Decryptor
Paste the encrypted v2 string to decrypt.
The decrypted result will appear here.
Encryptor
Paste plain text to encrypt.
The encrypted string will appear here.
function encode(string $string, string $secKey): string
{
$nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$key = hash('sha256', $secKey . '|encode_v2', true);
$box = sodium_crypto_secretbox($string, $nonce, $key);
return 'v2.' . rtrim(strtr(base64_encode($nonce . $box), '+/', '-_'), '=');
}
function decode(string $stringVal, string $secKey): string
{
$stringVal = str_replace(' ', '+', $stringVal);
if (str_starts_with($stringVal, 'v2.')) {
$stringVal = substr($stringVal, 3);
}
$raw = base64_decode(strtr($stringVal, '-_', '+/'), true);
if ($raw === false || strlen($raw) < SODIUM_CRYPTO_SECRETBOX_NONCEBYTES + SODIUM_CRYPTO_SECRETBOX_MACBYTES) {
return '';
}
$nonce = substr($raw, 0, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$box = substr($raw, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$key = hash('sha256', $secKey . '|encode_v2', true);
$plain = sodium_crypto_secretbox_open($box, $nonce, $key);
return $plain === false ? '' : $plain;
}