Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a line of code difficult to read

Im writing a way of checking if a customers serial number matches my hard coded number. Is there a way of making this as hard to read as possible in case an undesirable gets their hands on the code?

I am working in java.

For instance (pseudo code)

if (x != y) jump out of code and return error

Cheers , apologies if this is a bit of an odd one

like image 839
Candyfloss Avatar asked Aug 05 '10 10:08

Candyfloss


1 Answers

Security through obscurity is always a bad idea. You don't need to avoid it, but you should not trust solely on it.

Either encrypt your serials with a key you type in at startup of the service, or just specify the serials as hex or base64, not ASCII.

like image 121
Marcus Johansson Avatar answered Sep 20 '22 13:09

Marcus Johansson