51 lines
1.5 KiB
Plaintext
51 lines
1.5 KiB
Plaintext
program EonaCatCipherExample;
|
|
|
|
{$APPTYPE CONSOLE}
|
|
|
|
uses
|
|
SysUtils, EonaCatCipher;
|
|
|
|
{*
|
|
* EonaCatCipher - Because security is key!
|
|
*
|
|
* Copyright (c) 2024 EonaCat (Jeroen Saey)
|
|
*
|
|
* https://eonacat.com/license
|
|
*
|
|
* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
* OF SOFTWARE BY EONACAT (JEROEN SAEY)
|
|
*
|
|
* This software is provided "as is", without any express or implied warranty.
|
|
* In no event shall the authors or copyright holders be liable for any claim,
|
|
* damages or other liability, whether in an action of contract, tort or otherwise,
|
|
* arising from, out of or in connection with the software or the use or other
|
|
* dealings in the software.
|
|
*
|
|
* You may use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and permit persons to whom the Software is furnished
|
|
* to do so, subject to the following conditions:
|
|
*
|
|
* 1. The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* 2. The software must not be used for any unlawful purpose.
|
|
*
|
|
* For any inquiries, please contact: eonacat@gmail.com
|
|
*}
|
|
|
|
var
|
|
cipher: TEonaCatCipher;
|
|
encrypted: TArray<Byte>;
|
|
decrypted: string;
|
|
begin
|
|
cipher := TEonaCatCipher.Create('securePassword123!@#$');
|
|
try
|
|
encrypted := cipher.Encrypt('Thank you for using EonaCatCipher!');
|
|
decrypted := cipher.Decrypt(encrypted);
|
|
WriteLn('Decrypted: ' + decrypted);
|
|
finally
|
|
cipher.Free;
|
|
end;
|
|
end;
|
|
|