saint10
asked on
Encrypt - Decrypt text
I am trying to encrypt and decrypt text in my Delphi app. And i want to be able to save the result ( encrypted text in file a file and load it back eg..
from .INI file ). I have seen couple of functions here on EE but i can't find
any that can save it in file without return sign.
Konni the Saint
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can pass the encripted text to HEX numbers so
the text can be read from INI by lines
the text can be read from INI by lines
Mmmm... Encryption.
ASKER
bryan7 - samples?
var a:integer;
for a:= 1 to length(mystring) do
b:= b+inttohex(ord(mystring[a] ));
you can use this after having encripted the text,
this way the final text will be only characters
from A to F and 0 to 9 so you can read/write
to a stringlist and save/load to file
the only problem is that the text will be doubled...
when you want to desencript you must do the reverse..
bryan
for a:= 1 to length(mystring) do
b:= b+inttohex(ord(mystring[a]
you can use this after having encripted the text,
this way the final text will be only characters
from A to F and 0 to 9 so you can read/write
to a stringlist and save/load to file
the only problem is that the text will be doubled...
when you want to desencript you must do the reverse..
bryan
b is a string var
ASKER
thanks