Re: encryption with Delphi

[ Delphi Tutorials -- by DelphiLand ]

Posted by webmaster Guido on August 14, 2004 at 19:21:34:

In Reply to: Re: encryption with Delphi posted by Fabio on August 11, 2004 at 23:28:43:

: The code work correctly but is you use some combination of key with some combination of sequence caracters you abtain a Char(0) a null terminated string.

If you want to avoid the sequence $00, here's a work around for pure text files:

While encoding, if the result is $00, replace it with the code for an unused character, such as the code for $01.

In the decoding, if the resulting character is $01, replace it with the "correct" value.

Be sure to test it out thoroughly!

webmaster Guido

[ Delphi Tutorials -- by DelphiLand ]