Overview
After start of the program should appear its main window (see pic.1).
Main window contains fields for input of the password and the text for
encryption, a field for output of result, and also the block of the
passwords generator.
 Pic.1. Main program window.
Simply enter the your password in "Password" field, or set the password
length, preferably 16 symbols, and press the "Generate" button. Then enter
your text to encrypt in "Original text" field, or paste it from clipboard.
And press the "Encode" button - ecrypted and encoded text should appear in
"Encoded text" field. You may copy this result to clipboard and paste in
your source code in Delphi IDE.
For use of the encoded text in your program of them it is necessary to
declare, approximately how it is made below:
const
Password = 'TFYoyzc83tOjHe3g';
Encoded = #029#062#049#238#168#022#218#153#065#006#205#080#090#085#181#088+
#089#138#226#123#067#201#152#086#053#202#152#018#247#218#045#184+
#141#186#015#167#146#244#028#195#116#166#221#145#029#245#115#208+
#147#054#142#081#166#247#207#089#223#096#105#162#112#023#207#021;
And for decoding of this text you can use of XTEA.PAS module from the
distributive file, as shown below:
uses
XTea;
function GetMyPrivateText: string;
begin
Result := XTeaDecryptStr(Encoded, Password);
end;
The function GetMyPrivateText will return the original text.
The example of how it's working you can see in the DEMO.DPR project
in the distributive file.
|