Level 50
May 13, 2025
2
Level 8
Masking DB table's row ID using a random string - what should I use?
Hello,
If I want to mask the DB table id from the users, what is the best way to do it?
Should it be a random string or UUID? If it's a random string - what length and type? (like numbers, capital/lower-case letters etc.)
My goal is to mask the fetching of the row, so instead of using:
DB::table('my_table')->where('id', 5)->first();
It should be something like:
DB::table('my_table')->where('id', <some_masked_string>)->first();
Thanks
Please or to participate in this conversation.