Verschlüsselung. Das ist es!
Hab es mit XOR gelöst. Ist bestimmt nicht das Sicherste aber muss es in meinem Fall auch nicht sein.
Delphi-Quellcode:
function XORCrypt(Password,InputFilePath,OutputFilePath:String):Boolean;
var aktChar: Integer;
InputFile, OutputFile: File of Byte;
Buffer:Byte;
begin
Result := False;
try
aktChar := 1;
AssignFile(InputFile,InputFilePath);
Reset(InputFile);
AssignFile(OutputFile,OutputFilePath);
Rewrite(OutputFile);
while not Eof(InputFile) do
begin
if(aktChar > Length(Password)) then aktChar := 1;
Read(InputFile,Buffer);
Buffer := Buffer xor ord(Password[aktChar]);
Write(OutputFile,Buffer);
Inc(aktChar);
Application.ProcessMessages;
end;
finally
CloseFile(InputFile);
CloseFile(OutputFile);
Result := True;
end;
end;
Danke!