Good morning,
I tried out this:
var
Key : TScKey;
KeyList : TScKeyList;
Buf, RetBuf : SysUtils.TBytes;
ms : TMemoryStream;
begin
ms := TMemoryStream.Create;
ms.LoadFromFile('c:\testo.txt');
ms.Seek(0, soFromBeginning);
SetLength(Buf, ms.Size);
ms.Read(Buf[0], ms.Size);
KeyList := TScKeyList.Create(dmMain.FileStorage);
key := TScKey.Create(KeyList);
Key.KeyName := 'Key4';
RetBuf := Key.Encrypt(Buf);
Key.KeyName := 'Key4';
Buf := Key.Decrypt(RetBuf);
end;
I'm using trial of ScureBridge
Well, wether c:\testo.txt is quite small, all works well. If not, I receive the message: "An error occurred when encrypting data: length not valid"
Is that a limit or something wrong in my code?
Thank in advance,
Oscar