NetCode Configuration

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

NetCode Configuration Settings

Base64LineBreak:   Tells the component whether to include line breaks in Base64 encoded content or not.

By default, when encoding to Base64 format, the component will insert line breaks every 76 characters. Setting the Base64LineBreak config to false will cause these line breaks to be omitted from the Base64 encoded content. The default value is true.

Charset:   Specifies the charset used when encoding or decoding data.

Set this value to specify the charset that is used when encoding data. For instance: UTF-8.

EncodeHash:   Whether the hash value is hex encoded.

This setting determines whether the MD5, SHA1, or SHA256 hash value is hex encoded. When calling Encode if this setting is True (default) the hash value created will be hex encoded. When set to False the output will not be hex encoded and will be binary. This is only applicable to the following formats:

  • MD5
  • SHA1
  • SHA256

HMACAlgorithm:   The hash algorithm to use when generating a Hash-based Message Authentication Code (HMAC).

HMACAlgorithm is used to tell the component which hashing algorithm to use to generate the Hash-based Message Authentication Code (HMAC). HMACAlgorithm can be "SHA1" (Secure Hash Algorithm 1), "MD5" (Message Digest 5), or one of the SHA-2 algorithms mentioned below. You may truncate the hash output by specifying the desired number of bits. For instance "SHA1-96" and "MD5-96" are acceptable.

The component is capable utilizing the set of HMAC SHA-2 algorithms ("SHA-224", "SHA-256", "SHA-384", and "SHA-512").

The component also supports "RIPEMD160" as an HMAC algorithm.

HMACKey:   A key to use when generating a Hash-based Message Authentication Code (HMAC).

When using the Format fmtHMAC, it may be necessary to supply the component with a key to use when generating the Hash-based Message Authentication Code (HMAC). This key is incorporated into the hashing process to add entropy to the resulting hash code, making the plaintext harder to guess and increasing the message security. You may also set this to a hex value. For instance 0xAAAAAA is acceptable.

MaxFileSize:   When encoding, controls whether encoded data should be split into several files and gives the maximum allowed size for these files.

Some mailing systems require that the message size shouldn't exceed a certain size. Assigning a nonzero value to MaxFileSize makes the component split the encoded data into several files. FileCnt will contain the number of files created. Please refer to EncodedFile for filename conventions.

The default value for this setting is 0 (no limit).

IMPORTANT: if a non-zero value is assigned to MaxFileSize then a multiple filename should also be assigned to EncodedFile (end with question marks "?") so that the component can expand the filenames.

Please refer to the Error Codes section for a complete list of possible errors.

UseExtendedHexBase32:   Specifies whether or not the Extended Hex alphabet is used.

When Format is set to fmtBase32, UseExtendedHexBase32 is used to tell the component whether or not to use the Extended Hex alphabet. The default value is False.

UseModifiedUTF7:   Specifies whether or not a modified form of UTF-7 for IMAP mailbox naming is used.

When Format is set to fmtUTF7, UseModifiedUTF7 is used to tell the component whether or not to use a modified version of UTF-7 for IMAP mailbox naming. The default value is False.

Base Configuration Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g. RuntimeLicense, License File).
  • License Type: The type of license installed (e.g. Royalty Free, Single Server).
UseInternalSecurityAPI:   Tells the component whether or not to use the system security libraries or an internal implementation.

By default the component will use the system security libraries to perform cryptographic functions. When set to False calls to unmanaged code will be made. In certain environments this is not desirable. To use a completely managed security implementation set this setting to True. Setting this to True tells the component to use the internal implementation instead of using the system's security API.

Note: This setting is static. The value set is applicable to all components used in the application.

When this value is set the product's system DLL is no longer required as a reference, as all unmanaged code is stored in that file.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 .NET Edition - Version 20.0 [Build 8307]