views:

80

answers:

2

Hey All,

I was just wondering if there's a way to generate many different combinations of numbers and letters, based off of just one number/letter? For example:

From just this one String:

234jk43fc7898cfg58

We could generate MANY different combos like:

HGYTD786Gjhghjg76fghf8
8976sgh8976
cv34905bv7
435bv4875bvg487bv
45b6467ne456n
4n56n45n6

... where each generated string would end up being able to be recalculated BACK to its original String: 234jk43fc7898cfg58

Is this at all possible? I'd appreciate any help at all.

Thank you

+1  A: 

What you're looking for, in mathematics, is called a "Reversable Function".

Your combinations idea looks like a non starter, but there certainly are reversible functions available for dealing with data like this.

For instance, the existence of compression tools like Zip should give you hope...

What do you want the function for? If it's in anyway connected with cryptography my advice is to use the Cryptography features of .Net itself - don't try to reinvent a particularly complicated wheel. Added to which, the capabilties of .Net will far exceed anything you come up with. Not trying to put you down - just trying to be helpful...

Martin.

Martin Milan
I appreciate your help and advice, Martin. I am going to look at the Cryptography Class and also do some research of my own into Reversable Functions. The function will be used to generate random Strings, and the first customer's account number to match the original base string will win an entire year's subscription to my service for free. (I'm beinng very secretive about my new service as I do not want any details to get out before I've released it. ).Thank you very much for your help! :-)
lucifer
The correct term is *invertible* or *injective* (one-to-one)
BlueRaja - Danny Pflughoeft
A: 

For me this sounds like a compression algorithm (e.g. 7zip) to store the same information in lesser bytes or an encoding scheme (e.g. base64) to store the same information with only a subset of available byte combinations.

Oliver