[Gambas-user] Crypt/Decrypt

Rohnny Stormo rohnny at ...1248...
Thu Jan 19 16:41:59 CET 2006


How to crypt and decrypt a string with gambas2.

I have found md5(password, prefix) as string  and des(password, prefix) 
as string
Tried to use it twice but without any luck. If there is not decryption 
the modules are useless except for MD5 and Check
When Encrypt/Decrypt are ok, you may save password to local file more secure

The class should include
Md5(string) as string
CheckMD5(md5String) as boolean
EnCrypt(key, string) as string
DeCrypt(key, EnCryptString) as string

Or if it more crypt types can be used it  could be like this
EnCrypt(key,string, gb.crypt.???) as string
DeCrypt(key,string, gb.crypt.???) as string

Example of usage.
a1b2c3d4e5f6=Encrypt("MyPassword","Hello",gb.crypt.des)
Hello = DeCrypt("MyPassword","a1b2c3d4e5f6",gb.crypt.des)


-- 
-----------------------------------------
Gambas brings Basic to Linux.
My Gambas Community http://forum.stormweb.no





More information about the User mailing list