How it works
Methods :
Parameter |
Meaning |
DataStream:Tstream |
any TStream (Descendant) containing data. |
KeySteam:TStream |
any TStream (Descendant) containing the en/de-cryption key. |
No exceptions are handled by this component. This has been done to give you as a programmer the ability to handle and control eventual exceptions (use the TStreamCrypt methods in a try..except block to handle exceptions).
Sample code:
procedure TForm1.Button1Click(Sender: TObject);
var
dataStream,
Keystream :Tmemorystream;
begin
{note: this sample assumes two files in the current directory:
data.txt - containts the data
key.txt - contains the key }
{create the streams}
dataStream:=TmemoryStream.Create;
KeyStream :=TmemoryStream.Create;
{load data from files into streams (note you can use filestreams as well)}
{Encrypt the data}
{save the encrypted data to a file named 'crypted.txt'}
datastream.SaveToFile('crypted.txt');
{Decrypt the data}
{save the decrypted data to a file named 'decrypted.txt'}
datastream.SaveToFile('Decrypted.txt');
{free the streams}
Pricing
Component (royalty free) |
Free of charge |
Component Source |
Not available |
IMPORTANT-READ CAREFULLY
: This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and The Software Factory Ltd. for the TStreamCrypt Component later refered to as 'SOFTWARE COMPONENT'. By installing, copying, or otherwise using the SOFTWARE COMPONENT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, do not install or use the SOFTWARE COMPONENT; you may, however, return it to your place of purchase for a full refund.SOFTWARE COMPONENT LICENSE
The SOFTWARE COMPONENT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE COMPONENT is licensed, not sold.
1. GRANT OF LICENSE. This EULA grants you the following rights:
2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
NO LIABILITY FOR CONSEQUENTIAL DAMAGES. To the maximum extent permitted by applicable law, in no event shall The Software Factory Ltd. or its suppliers be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use the software component, even if The Software Factory Ltd. has been advised of the possibility of such damages. In any case, The Software Factory Ltd. entire liability under any provision of this EULA shall be limited to the greater of the amount actually paid by you for the SOFTWARE COMPONENT or US$5.00.
For further information do contact:
The Software Factory Ltd.