e-CryptIt Engine REALbasic Plugin

BinHex Class

To handle BinHex encoding and decoding.

Object
   BinHex

class BinHex

Properties

ResourceForkWasSkippedThis property returns true if the ResourceFork was skipped when decoding a BinHex-ed file on Windows operating systems. (On MacOS systems it will always return false)

Methods

AbortTo abort decoding, call Abort from the events used by the decoder. To abort encoding, simply return a non-zero value from the encoding event.
DecodeTo start to decode a file. Before calling it you should open the input file and when the OnHqxDecode event is fired then you should read the same amount of bytes from the input stream as asked by the event.
DecodeTo start to decode a file. Before calling it you should open the input file and when the OnHqxDecode event is fired then you should read the same amount of bytes from the input stream as asked by the event.
EncodeTo start to encode a file. To encode a file you need to create a new class and subclass of the BinHex 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 OnHqxEncode 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.
EncodeTo start to encode a file. To encode a file you need to create a new class and subclass of the BinHex 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 OnHqxEncode 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.

Events

OnHqxDecodeThis 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.
OnHqxEncodeThis event is fired when the encoder has encoded data ready to be written to a file or a socket.
OnNameIsKnownThis event is fired if FireNameEvent was set to True 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 its written to disk.

Supported Platforms:

  • MacOS X PPC - (Mach-O)
  • MacOS X Universal Binary (Mach-O)
  • MacOS X Cocoa Universal Binary (Mach-O)
  • Win32 - Windows
  • Linux x86

    Unsupported Platforms: