[Gambas-user] How to decrypt a text? Any suggestions?

Brant Wells bwells at ...475...
Wed Jun 16 15:17:07 CEST 2004


Hans-Martin:

You could always come up with a quick formula based on the ASCII value 
of the Text that you are storing.   The upside is that you can always 
change it, etc.  However, the downside, is that it can be slow if your 
program has to call it many times.   An example...

Say that A=10, B=11, and C=12
 Step 1.  Reverse the string, from ABC to CBA (the ascii order would be 
121110
Step 2. Reverse the ASCII values so you'd wind up with 211101
   Note aboud step 2.  make sure you format ascii values that are less 
than 10 to have two digits: ID: 9  
   should be represented as 09


Step 3. Store the value from step 2 (in this case, 211101) into the 
password field... or convert the Values from step 2 back into their 
ascii Characters using the chr$() function.


The decryption routine should be just as easy to figure out. ;-)

See Ya!
~Brant


Hans-Martin Bundeshund wrote:

>Hello group,
>
>I hope that I don't ask too many questions here and i will be not filtered ;)
>
>
>I have a database with usernames and passwords stored with mysql. I want to 
>write the passwords not in plain text as I do quite now. 
>
>Any ideas how I can easely decrypt (and encrypt) the plain text using gambas? 
>(I do not want a call to an external script/programm just to use a litle code 
>inside)
>
>Thankfull
>
>HM
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by the new InstallShield X.
>>From Windows to Linux, servers to mobile, InstallShield X is the
>one installation-authoring solution that does it all. Learn more and
>evaluate today! http://www.installshield.com/Dev2Dev/0504
>_______________________________________________
>Gambas-user mailing list
>Gambas-user at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>  
>





More information about the User mailing list