[fpc-pascal] Saving and reading TBlowfish crypted text

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue Mar 17 10:50:03 CET 2015


On 2015-03-16 20:05, Antonio Sanguigni wrote:
>    en.WriteAnsiString(Memo1.Lines.Text);
>    fs.WriteBuffer(Pointer(s1.DataString)^, length(s1.DataString));
>    en.Free;

Maybe you decryption isn't working because the encrypted text you
created isn't complete.

Normally you need to call Flush to write the remaining bytes before you
free the TBlowFishEncryptStream instance.

I normally use the Read() and Write() methods too. I've never used
Blowfish WriteAnsiString() before.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/



More information about the fpc-pascal mailing list