Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ok Ladies and G... Ladies, here is the macho man solution for the brave. FileCrypt2.zip
  2. Ok boss, got it. When I solve the problem of shooting myself Ill post it here. 🙂
  3. Ah you used LockBox component... what a shame! Real professionals don't use other people's components they make their own. But it's OK, it works.
  4. Should not use FileStream or MemoryStream, no stream at all, just readblock - encrypt block - write block
  5. Ok thanks I think the problem with the above code is that it gives whole file buffer as input while only 16 B is acceptable. Thats why it takes first 16 B and the rest throws away. The right way should be ReadBlock 16 by 16 B until EOF and perform readblock 16B - encrypt 16B - write 16 B until EOF.
  6. This doesnt work: var Source, Dest: TFileStream; SrcFile, DestFile: string; Start, Stop: cardinal; Size: integer; SourceKey,NewKey: AESBlock; Key: AES128Key; SrcBuf, DstBuf: array [0..16383] of byte; SrcSize, DstSize: integer; MyInBlock, MyOutBlock: AESBlock; begin Source := TFileStream.Create(txtFile.Text, fmOpenRead); DestFile := ExtractFilePath(Application.ExeName) + 'aestemp.enc'; Dest := TFileStream.Create(DestFile, fmCreate); try Size:=Source.Read(SourceKey,SizeOf(SourceKey)); if Size<>SizeOf(SourceKey) then raise Exception.Create('Unable to read SourceKey from file.'); FillChar( Key, SizeOf(Key), 0 ); Move( PAnsiChar(AnsiString(txtPassword.Text))^, Key, Min( SizeOf( Key ), Length( txtPassword.Text ) )); //FillChar( MyInBlock, SizeOf(MyInBlock), 0 ); //Move(Source.ReadBuffer(SrcBuf,Size), MyInBlock, Min( SizeOf( MyInBLock ), Size )); NewKey:=AES128Cipher(SourceKey,Key); Dest.WriteBuffer(NewKey,SizeOf(NewKey)); //AES128Cipher(Source,Key) //Dest.WriteBuffer(AES128Cipher(Source,Key),Size); finally Dest.Free; Source.Free; end; showmessage('Finished');
  7. Yes, but its component. Is there any standalone unit? Like this one: https://github.com/stijnsanders/tools - has standalone units in crypto folder, but unfortunately they do not produce accurate results: https://github.com/stijnsanders/tools/tree/master/crypto https://github.com/stijnsanders/tools/blob/master/crypto/aes.pas - when encrypting binary file I get only 16 B file back. But no error when building/compiling.
  8. Hello, does anybody know of any good Delphi AES (or similar) unit to encrypt/decrypt binary files? I found plenty however none works well - there is loss of information or can only encrypt/decrypt strings. Must be able to encrypt/decrypt binary file without loss of information - after decrypting back to original the exe file must be exactly the same in size. Help is needed.
  9. direktor05

    Lazarus build for Linux

  10. direktor05

    Lazarus build for Linux

    Im using Windows 7
  11. direktor05

    Lazarus build for Linux

    Hello, Can someone tell me how to set Lazarus to build for Linux? When I try to set up builder is gives some error that that system.ppu for this target (Linux) was not found. Maybe some libraries for Linux are missing? Where to get them? How to set this up properly?
  12. Hello, I started with Turbo Pascal 5.0 in 1994 under DOS 5.0 then moved to Delphi 3,4,5,6,7... up to Delphi 10. Worked on financial/accounting/ERP software mostly. More details/CV/code samples on demand by email. Remotely at the beginning until virus epidemic isn't over.