<?php

use Illuminate\Support\Facades\Crypt;

if (!function_exists('encrypt_id')) {
    function encrypt_id($id)
    {
        $key = 12345678910111213; // smaller secret key, safe for XOR
        $id = $id ^ $key; // XOR
        return base_convert($id, 10, 36); // base36 short string
    }
}

if (!function_exists('decrypt_id')) {
    function decrypt_id($shortId)
    {
        $key = 12345678910111213;
        $id = base_convert($shortId, 36, 10);
        return $id ^ $key; // reverse XOR
    }
}


 