Page 1 of 1
Help please - encryption formula
Posted: Tue Jul 17, 2012 3:50 pm
by Jon Corby
Does anyone have a "simple" formula for encrypting a number? I want to disguise a column in a table (wage cost per hour) so that people browsing the table can't easily see the true value. It doesn't really need to stand up to any attempts to hack, but for the values n1,n2,n3 I'd like it be not obvious what they are, and that n1 > n2 > n3. (Equal values would equate to the same encrypted value I guess, but that's not really an issue.)
I'd really like this just to be a single line formula to make it easy to use, as I don't want an obvious encryption/decryption routine - nobody else but me and my manager will know what this value represents and that it's even encrypted. This means I'm anticipating the encrypted value to also be a number, but I'm open to any suggestions.
Thanks in advance

Re: Help please - encryption formula
Posted: Tue Jul 17, 2012 4:48 pm
by Michael Wallace
Convert first letter of employee name to a number (A = 1, B = 2, etc.), add/subtract this from the wage? Could pick any letter in their name this way to make it less decipherable (although this won't keep the same numbers the same for different people). Probably neater solutions but that was my first thought.
Re: Help please - encryption formula
Posted: Tue Jul 17, 2012 6:39 pm
by JimBentley
How about choose a 10-letter word with no repeating letters (e.g. TRAMPOLINE) and map the numbers 0-9 with that word, e.g.
Code: Select all
0 1 2 3 4 5 6 7 8 9
T R A M P O L I N E
So £12.75 would be RAIO, £12.34 would be RAMP, £8.50 would be NOT, etc. etc.
Re: Help please - encryption formula
Posted: Tue Jul 17, 2012 8:25 pm
by Bob De Caux
I presume this is in Excel? If you divide everyone's hourly wage by 1000, add a random number x and then format the column as Date, everyone's entry will just show the same date, which you can choose via x (e.g x = 41,000 gives everyone the date 01/04/2012). Pretty unlikely anyone would try formatting back to number unless they knew about it, but you can do it whenever you need to recover the info.
Re: Help please - encryption formula
Posted: Wed Jul 18, 2012 7:29 am
by Jon Corby
Bob De Caux wrote:I presume this is in Excel? If you divide everyone's hourly wage by 1000, add a random number x and then format the column as Date, everyone's entry will just show the same date, which you can choose via x (e.g x = 41,000 gives everyone the date 01/04/2012). Pretty unlikely anyone would try formatting back to number unless they knew about it, but you can do it whenever you need to recover the info.
Sorry no, it's a column in a database table.
Jim's idea has two main negatives - it's difficult to encode encryption/decryption in a single line, plus it's also fairly apparent from the length that one person earns more than another. FFS, what the hell were you thinking?
I quite like extending Coon's idea to encrypting x with the formula ax+b, where a & b could be the 2nd and 5th (for example) characters of the logon. That will still leave me with a simple single line formula for both encryption and decryption, and I reckon a suitably encrypted set of data such that anybody stumbling upon it wouldn't be able to see anybody's hourly rate, or whether person A earned more than person B.
Cheers guys. Except Jim.
Re: Help please - encryption formula
Posted: Wed Jul 18, 2012 6:35 pm
by JimBentley
Jon Corby wrote:Jim's idea has two main negatives - it's difficult to encode encryption/decryption in a single line, plus it's also fairly apparent from the length that one person earns more than another.
Well, I imagined that you poncy fucking southern twats all earned over £10.00 per hour anyway, so it shouldn't really matter. Although I suppose some of you cunts probably earn more than £100.00 per hour, so the same problem would apply.
Jon Corby wrote:FFS, what the hell were you thinking?
Sorry Jon. I'll try to do better next time, I promise.
Re: Help please - encryption formula
Posted: Thu Jul 19, 2012 9:10 am
by Jon Corby
JimBentley wrote:Sorry Jon. I'll try to do better next time, I promise.
Just don't bother.
Re: Help please - encryption formula
Posted: Thu Jul 19, 2012 6:20 pm
by JimBentley
Jon Corby wrote:JimBentley wrote:Sorry Jon. I'll try to do better next time, I promise.
Just don't bother.
But the only reason I carry on living is in the remote chance that something I may do in the future might please you! Should I kill myself?
Re: Help please - encryption formula
Posted: Fri Jul 20, 2012 8:13 am
by Jon Corby
JimBentley wrote:Jon Corby wrote:JimBentley wrote:Sorry Jon. I'll try to do better next time, I promise.
Just don't bother.
But the only reason I carry on living is in the remote chance that something I may do in the future might please you! Should I kill myself?
Well kind of yes, but then you killing yourself would displease me immensely. It's quite the paradox.