Piece of cake. Here's the basics of the process.
- Create a string constant that includes A-Z and 0-9 but in a scrambled order (DecryptStr);
- Create a second string that includes all of the characters you will need to encrypt (EncryptStr) ina different scrambled order;
- Create a function (EncryptIt) that accept a string as an input value and return a string as a result value;
- In the EncryptIt function, you first create a numeric equivalent of the string to be encrypted by multiplying 1 by the Pos() of the first character in the EncryptStr string then continuing the multiplication by the Pos() of each of the succeeding characters;
- Now that you have a numereric equivalent of the string, all you need to do is reverse the process, using the DecryptStr string and working with the modulus (i.e. the remainder after dividing by) based upon the number of characters in the DecryptStr string (and I would build the resulting string from left to right ;-);
- In order to decrypt the string, you build a a similar (DecryptIt) function that also accepts a string parameter and returns a string result;
- The DEcryptIt process uses the same processing except it first uses the Decrypt string and then uses the EncryptStr (And the Modulo arithmetic needs to be based on the number of characters in the Encrypt string), again building the string from left to right.
I can supply a basic set of these two functions if you need them (I have used them for various similar task ;-).





by: SteveBayPosted on 2009-07-01 at 11:24:55ID: 24756861
Free and as simple of complex as you like. jects/tplo ckbox/
http://sourceforge.net/pro