e-CryptIt Engine Xojo Plugin

MacBinary Class (console safe)

To handle MacBinary III encoding and decoding.

Object
   MacBinary

class MacBinary

Methods

Abort (console safe) To abort decoding, call Abort from the events used by the decoder. To abort encoding, simply return a non-zero value from the encoding event.
Decode (console safe) To start to decode a file. Before calling this function you should open the input file, and when the MacBinary fires the OnMacBinaryDecode event then you should read the same amount of bytes as the event asks for from the input stream.
Encode (console safe) To start to encode a file. If you inherit from the class then you can receive events from it, such as status event and event for in place encoding. To encode a file you need to create a new class and subclass of the MacBinary class so you can receive the class events. When data parts are ready to be written to a file or to a socket then the OnMacBinaryEncode event is fired. That's where you should write the data to a file or handle it in any desired way. It is wise to open the file output stream before you call the encode function, and to close it after it.
SetLocation (console safe) Use this method in the OnNameIsknown event to change name or location of the output file.

Events

OnMacBinaryDecodeThis event is fired when the decoder wants more data. Do not send more data than what is asked. You may send less, e.g. if it's the end of the file.
OnMacBinaryEncodeThis event is fired when the encoder has encoded data ready to be written to a file or a socket.
OnNameIsKnownThis event is fired if DefaultLocation was set to False in the Decode Method. It is fired as soon as the file name of the original file is known. It allows you to modify the file name and its location before it is written to disk.

Supported Platforms:

  • MacOS X Carbon
  • MacOS X Cocoa 32 bit

    Unsupported Platforms:

  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM