[fpc-pascal] Cryptography with Blowfish
luciano de souza
luchyanus at gmail.com
Tue Dec 1 20:57:28 CET 2015
Hello all,
What's wrong with this code?
I try to cryptograph a file. The compiler doesn't raise errors, but
after running the program, no results happen.
program test;
{$mode objfpc}{$H+}
uses
blowfish, classes;
var
VMemory: TMemoryStream;
VCypher: TBlowfishEncryptStream;
BEGIN
VMemory := TMemoryStream.create;
VMemory.LoadFromFile('origin.txt');
VCypher := TBlowfishEncryptStream.create('lazarus-br', VMemory);
try
VMemory.position := 0;
VCypher.write(VMemory.memory, VMemory.size);
VMemory.SaveToFile('output.bfe');
finally
VCypher.free;
VMemory.free;
end;
END.
--
Luciano de Souza
More information about the fpc-pascal
mailing list