Discuss this help topic in SecureBlackbox Forum
Use stream classes
Most SecureBlackbox classes use stream objects to load and save the data. Stream objects are native to some, but not all platforms, supported by SecureBlackbox.
The important thing to remember is that the methods of SecureBlackbox classes, which accept a stream as a parameter, do not reset its position to the beginning before reading the data from the stream. This means that if you have written some data to the stream and want to send the data to the server (for example), you need to reset stream position to 0 before passing the stream to SecureBlackbox class. Not doing this will lead to the 0-byte-long block of data being sent to the server.
VCL/NG edition: you can use regular TStream (TMemoryStream, TFileStream) descendants to work with streams. It is not recommended to use TStringStream to work with binary data as such use is error-prone and leads to confusion, especially in Unicode versions of Delphi and C++Builder.
.NET edition: you can use regular System.IO.Stream descendants (MemoryStream, FileStream) to work with streams. It is not recommended to use StreamReader and StreamWriter classes, as they are designed for working with text data, and their use with binary data leads to hard-to-track errors.
Java edition: you can use both standard java.io.InputStream/OutputStream descendants and TElMemoryStream/TElFileStream classes provided by SecureBlackbox. Supported stream types depend on particular class and its methods.
PHP Edition: you can use TMemoryStream/TFileStream classes provided by SecureBlackbox to work with streams.
C++ Edition: you can use TMemoryStream/TFileStream classes provided by SecureBlackbox to work with streams.