Generate many combinations of numbers based on
I was just wo开发者_如何转开发ndering 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
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.
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.
精彩评论