Declaration: BlowFishEncryptStream (pwd: string; InStream, OutStream: TStream): integer;
The function BlowFishEncryptStream encrypts the stream InStream by applying the BlowFish cipher. The parameter pwd specifies the password. The encrypted stream is written to OutStream, starting at the current stream position (thus overwriting all data at and after OutStream.Position).

The function returns the following error codes:

 0 ... everything is OK
-1 ... password is empty
-2 ... Instream is empty

Hint: The stream InStream is automatically rewound to ensure that the entire stream is processed.