Help please - encryption formula
Moderator: Jon O'Neill
Help please - encryption formula
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
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
- Michael Wallace
- Racoonteur
- Posts: 5458
- Joined: Mon Jan 21, 2008 5:01 am
- Location: London
Re: Help please - encryption formula
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.
- JimBentley
- Fanatic
- Posts: 2820
- Joined: Fri Jan 11, 2008 6:39 pm
- Contact:
Re: Help please - encryption formula
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.
So £12.75 would be RAIO, £12.34 would be RAMP, £8.50 would be NOT, etc. etc.
Code: Select all
0 1 2 3 4 5 6 7 8 9
T R A M P O L I N E
-
- Enthusiast
- Posts: 265
- Joined: Wed Sep 09, 2009 3:18 pm
Re: Help please - encryption formula
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
Sorry no, it's a column in a database table.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.
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.
- JimBentley
- Fanatic
- Posts: 2820
- Joined: Fri Jan 11, 2008 6:39 pm
- Contact:
Re: Help please - encryption formula
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: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.
Sorry Jon. I'll try to do better next time, I promise.Jon Corby wrote:FFS, what the hell were you thinking?
Re: Help please - encryption formula
Just don't bother.JimBentley wrote:Sorry Jon. I'll try to do better next time, I promise.
- JimBentley
- Fanatic
- Posts: 2820
- Joined: Fri Jan 11, 2008 6:39 pm
- Contact:
Re: Help please - encryption formula
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?Jon Corby wrote:Just don't bother.JimBentley wrote:Sorry Jon. I'll try to do better next time, I promise.
Re: Help please - encryption formula
Well kind of yes, but then you killing yourself would displease me immensely. It's quite the paradox.JimBentley wrote: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?Jon Corby wrote:Just don't bother.JimBentley wrote:Sorry Jon. I'll try to do better next time, I promise.