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
saint10Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
EpsylonConnect With a Mentor Commented:
Here's a component that does quite good encryption:

http://www5.ewebcity.com/epsylon/download.asp?file=CryptLib.zip
0
 
saint10Author Commented:
brilliant Epsylon.

thanks
0
 
bryan7Commented:
you can pass the encripted text to HEX numbers so
the text can be read from INI by lines
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
PsylordCommented:
Mmmm... Encryption.
0
 
saint10Author Commented:
bryan7 - samples?
0
 
bryan7Commented:
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
0
 
bryan7Commented:
b is a string var
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.