MailWriter Class

Properties   Methods   Events   Config Settings   Errors  

The MailWriter class composes, encrypts, and signs e-mail messages.

Syntax

MailWriter

Remarks

Use MailWriter to compose, sign, and encrypt e-mail messages, and prepare them for sending or saving.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

AttachEncodingThe encoding to be applied to the attachments.
AttachCountThe number of records in the Attach arrays.
AttachContentSubtypeContains the content subtype of the attachment.
AttachContentTypeContain the content type of the attachment.
AttachCreationDateThe creation date.
AttachDataThe content of the attachment.
AttachDescriptionTextual description of the attachment.
AttachFilenameSpecifies the name of the attachment file.
AttachHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
AttachIDContains the attachment's unique identifier.
AttachModificationDateSpecifies the date and time of the file's last modification.
AttachReadDateSpecifies the file's last read date.
AttachSizeAttachment's size in bytes.
BccAddrCountThe number of records in the BccAddr arrays.
BccAddrAddressContains the e-mail address in the form of john@doe.
BccAddrDisplayNameContains the friendly name of the user of this address, such as John Doe.
BccAddrGroupNameThe name of the group this address belongs to.
CcAddrCountThe number of records in the CcAddr arrays.
CcAddrAddressContains the e-mail address in the form of john@doe.
CcAddrDisplayNameContains the friendly name of the user of this address, such as John Doe.
CcAddrGroupNameThe name of the group this address belongs to.
CharsetThe charset to apply to Message .
EncryptionCertCountThe number of records in the EncryptionCert arrays.
EncryptionCertBytesReturns raw certificate data in DER format.
EncryptionCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
ExternalCryptoAsyncDocumentIDSpecifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.
ExternalCryptoCustomParamsCustom parameters to be passed to the signing service (uninterpreted).
ExternalCryptoDataAdditional data to be included in the async state and mirrored back by the requestor.
ExternalCryptoExternalHashCalculationSpecifies whether the message hash is to be calculated at the external endpoint.
ExternalCryptoHashAlgorithmSpecifies the request's signature hash algorithm.
ExternalCryptoKeyIDThe ID of the pre-shared key used for DC request authentication.
ExternalCryptoKeySecretThe pre-shared key used for DC request authentication.
ExternalCryptoMethodSpecifies the asynchronous signing method.
ExternalCryptoModeSpecifies the external cryptography mode.
ExternalCryptoPublicKeyAlgorithmProvide public key algorithm here if the certificate is not available on the pre-signing stage.
FIPSModeReserved.
FromAddrCountThe number of records in the FromAddr arrays.
FromAddrAddressContains the e-mail address in the form of john@doe.
FromAddrDisplayNameContains the friendly name of the user of this address, such as John Doe.
FromAddrGroupNameThe name of the group this address belongs to.
HeaderEncodingThe encoding to be applied to the message header.
MailerThe name of the software used to compose and/or send the message.
MsgAttachmentCountReturns the number of attachments in this message.
MsgBccThe contents of the BCC header property.
MsgCcThe value of the CC header property.
MsgCommentsContains additional information about the message body.
MsgDateThe date and time when the message entered the mail delivery system.
MsgDeliveryReceiptEnables delivery notification.
MsgFromContains the value of the From header property.
MsgHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
MsgHtmlTextThe HTML version of the message.
MsgIDThe contents of the Message-ID header property.
MsgInReplyToThe value of the In-Reply-To header property.
MsgKeywordsThe value of the Keywords header property.
MsgMailerThe name of the software that was used to send the message.
MsgPlainTextThe plain text version of the message.
MsgPrioritySpecifies the message priority.
MsgReadReceiptEnables a read notification.
MsgReferencesThe value of the References header property.
MsgReplyToThe value of the Reply-To header property.
MsgReturnPathThe value of the Return-Path header property.
MsgSenderThe value of the Sender header property.
MsgSendToThe value of the To header property.
MsgSubjectContains the subject property of this message.
HeaderFieldCountThe number of records in the HeaderField arrays.
HeaderFieldCategorySpecifies the string category of the contained value.
HeaderFieldFormatSpecifies the format (encoding) of the value contained in the Value property.
HeaderFieldNameThe name element in a (name, value) pair.
HeaderFieldValueThe value element in a (name, value) pair.
ProfileSpecifies a pre-defined profile to apply when creating the signature.
ReplyToAddrCountThe number of records in the ReplyToAddr arrays.
ReplyToAddrAddressContains the e-mail address in the form of john@doe.
ReplyToAddrDisplayNameContains the friendly name of the user of this address, such as John Doe.
ReplyToAddrGroupNameThe name of the group this address belongs to.
SecSettingsClaimedSigningTimeSpecifies the signing time from the signer's computer.
SecSettingsEncryptWhether to encrypt the message.
SecSettingsEncryptionAlgorithmSpecifies the encryption algorithm to be used.
SecSettingsHashAlgorithmSpecifies the hash algorithm to be used.
SecSettingsSignWhether to sign the message.
SecSettingsSignatureFormatSpecifies the signature format to use for the signed message.
SecSettingsSignBeforeEncryptSpecifies the order of encryption and signing operations.
SecSettingsSignMessageHeaderSpecifies whether to include the message header in the signature calculation.
SenderAddrAddressContains the e-mail address in the form of john@doe.
SenderAddrDisplayNameContains the friendly name of the user of this address, such as John Doe.
SenderAddrGroupNameThe name of the group this address belongs to.
SendToAddrCountThe number of records in the SendToAddr arrays.
SendToAddrAddressContains the e-mail address in the form of john@doe.
SendToAddrDisplayNameContains the friendly name of the user of this address, such as John Doe.
SendToAddrGroupNameThe name of the group this address belongs to.
SigningCertBytesReturns raw certificate data in DER format.
SigningCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
SigningChainCountThe number of records in the SigningChain arrays.
SigningChainBytesReturns raw certificate data in DER format.
SigningChainHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
TextEncodingThe encoding to be applied to the message.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

AttachBytesCreates an attachment from a memory buffer.
AttachFileCreates an attachment from a file.
AttachImageCreates an image attachment from a memory buffer.
ConfigSets or retrieves a configuration setting.
DoActionPerforms an additional action.
SaveToBytesSerializes the message to a byte array.
SaveToFileSerializes the message to a file.
SaveToStreamSerializes the message to a stream.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ErrorReports information about errors during e-mail message assembling or saving.
ExternalSignHandles remote or external signing initiated by the SignExternal method or other source.
NotificationThis event notifies the application about an underlying control flow event.

Config Settings


The following is a list of config settings for the class with short descriptions. Click on the links for further details.

BitsInKeyKey length for the block cipher used for encryption. The value should be a multiple of 8.
IncludeSigningCertificateIf true (by default), the signing certificate is included into the signature. Otherwise, it is included only if SigningChain is not empty.
TempPathPath for storing temporary files.
CheckKeyIntegrityBeforeUseEnables or disable private key integrity check before use.
CookieCachingSpecifies whether a cookie cache should be used for HTTP(S) transports.
CookiesGets or sets local cookies for the class.
DefDeriveKeyIterationsSpecifies the default key derivation algorithm iteration count.
EnableClientSideSSLFFDHEEnables or disables finite field DHE key exchange support in TLS clients.
GlobalCookiesGets or sets global cookies for all the HTTP transports.
HttpUserAgentSpecifies the user agent name to be used by all HTTP clients.
LogDestinationSpecifies the debug log destination.
LogDetailsSpecifies the debug log details to dump.
LogFileSpecifies the debug log filename.
LogFiltersSpecifies the debug log filters.
LogFlushModeSpecifies the log flush mode.
LogLevelSpecifies the debug log level.
LogMaxEventCountSpecifies the maximum number of events to cache before further action is taken.
LogRotationModeSpecifies the log rotation mode.
MaxASN1BufferLengthSpecifies the maximal allowed length for ASN.1 primitive tag data.
MaxASN1TreeDepthSpecifies the maximal depth for processed ASN.1 trees.
OCSPHashAlgorithmSpecifies the hash algorithm to be used to identify certificates in OCSP requests.
StaticDNSSpecifies whether static DNS rules should be used.
StaticIPAddress[domain]Gets or sets an IP address for the specified domain name.
StaticIPAddressesGets or sets all the static DNS rules.
TagAllows to store any custom data.
TLSSessionGroupSpecifies the group name of TLS sessions to be used for session resumption.
TLSSessionLifetimeSpecifies lifetime in seconds of the cached TLS session.
TLSSessionPurgeIntervalSpecifies how often the session cache should remove the expired TLS sessions.
UseOwnDNSResolverSpecifies whether the client classes should use own DNS resolver.
UseSharedSystemStoragesSpecifies whether the validation engine should use a global per-process copy of the system certificate stores.
UseSystemOAEPAndPSSEnforces or disables the use of system-driven RSA OAEP and PSS computations.
UseSystemRandomEnables or disables the use of the OS PRNG.

AttachEncoding Property (MailWriter Class)

The encoding to be applied to the attachments.

Syntax

ANSI (Cross Platform)
int GetAttachEncoding();
int SetAttachEncoding(int iAttachEncoding); Unicode (Windows) INT GetAttachEncoding();
INT SetAttachEncoding(INT iAttachEncoding);

Possible Values

ME_AUTO(0), 
ME_8BIT(1),
ME_BASE_64(2),
ME_QUOTED_PRINTABLE(3)
int secureblackbox_mailwriter_getattachencoding(void* lpObj);
int secureblackbox_mailwriter_setattachencoding(void* lpObj, int iAttachEncoding);
int GetAttachEncoding();
int SetAttachEncoding(int iAttachEncoding);

Default Value

0

Remarks

Use this property to specify the encoding method for the attached files.

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Data Type

Integer

AttachCount Property (MailWriter Class)

The number of records in the Attach arrays.

Syntax

ANSI (Cross Platform)
int GetAttachCount();
int SetAttachCount(int iAttachCount); Unicode (Windows) INT GetAttachCount();
INT SetAttachCount(INT iAttachCount);
int secureblackbox_mailwriter_getattachcount(void* lpObj);
int secureblackbox_mailwriter_setattachcount(void* lpObj, int iAttachCount);
int GetAttachCount();
int SetAttachCount(int iAttachCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at AttachCount - 1.

This property is not available at design time.

Data Type

Integer

AttachContentSubtype Property (MailWriter Class)

Contains the content subtype of the attachment.

Syntax

ANSI (Cross Platform)
char* GetAttachContentSubtype(int iAttachIndex);
int SetAttachContentSubtype(int iAttachIndex, const char* lpszAttachContentSubtype); Unicode (Windows) LPWSTR GetAttachContentSubtype(INT iAttachIndex);
INT SetAttachContentSubtype(INT iAttachIndex, LPCWSTR lpszAttachContentSubtype);
char* secureblackbox_mailwriter_getattachcontentsubtype(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachcontentsubtype(void* lpObj, int attachindex, const char* lpszAttachContentSubtype);
QString GetAttachContentSubtype(int iAttachIndex);
int SetAttachContentSubtype(int iAttachIndex, QString qsAttachContentSubtype);

Default Value

""

Remarks

Contains the content subtype of the attachment.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachContentType Property (MailWriter Class)

Contain the content type of the attachment.

Syntax

ANSI (Cross Platform)
char* GetAttachContentType(int iAttachIndex);
int SetAttachContentType(int iAttachIndex, const char* lpszAttachContentType); Unicode (Windows) LPWSTR GetAttachContentType(INT iAttachIndex);
INT SetAttachContentType(INT iAttachIndex, LPCWSTR lpszAttachContentType);
char* secureblackbox_mailwriter_getattachcontenttype(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachcontenttype(void* lpObj, int attachindex, const char* lpszAttachContentType);
QString GetAttachContentType(int iAttachIndex);
int SetAttachContentType(int iAttachIndex, QString qsAttachContentType);

Default Value

""

Remarks

Contain the content type of the attachment.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachCreationDate Property (MailWriter Class)

The creation date.

Syntax

ANSI (Cross Platform)
char* GetAttachCreationDate(int iAttachIndex);
int SetAttachCreationDate(int iAttachIndex, const char* lpszAttachCreationDate); Unicode (Windows) LPWSTR GetAttachCreationDate(INT iAttachIndex);
INT SetAttachCreationDate(INT iAttachIndex, LPCWSTR lpszAttachCreationDate);
char* secureblackbox_mailwriter_getattachcreationdate(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachcreationdate(void* lpObj, int attachindex, const char* lpszAttachCreationDate);
QString GetAttachCreationDate(int iAttachIndex);
int SetAttachCreationDate(int iAttachIndex, QString qsAttachCreationDate);

Default Value

""

Remarks

The creation date.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachData Property (MailWriter Class)

The content of the attachment.

Syntax

ANSI (Cross Platform)
int GetAttachData(int iAttachIndex, char* &lpAttachData, int &lenAttachData);
int SetAttachData(int iAttachIndex, const char* lpAttachData, int lenAttachData); Unicode (Windows) INT GetAttachData(INT iAttachIndex, LPSTR &lpAttachData, INT &lenAttachData);
INT SetAttachData(INT iAttachIndex, LPCSTR lpAttachData, INT lenAttachData);
int secureblackbox_mailwriter_getattachdata(void* lpObj, int attachindex, char** lpAttachData, int* lenAttachData);
int secureblackbox_mailwriter_setattachdata(void* lpObj, int attachindex, const char* lpAttachData, int lenAttachData);
QByteArray GetAttachData(int iAttachIndex);
int SetAttachData(int iAttachIndex, QByteArray qbaAttachData);

Remarks

The content of the attachment.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

Byte Array

AttachDescription Property (MailWriter Class)

Textual description of the attachment.

Syntax

ANSI (Cross Platform)
char* GetAttachDescription(int iAttachIndex);
int SetAttachDescription(int iAttachIndex, const char* lpszAttachDescription); Unicode (Windows) LPWSTR GetAttachDescription(INT iAttachIndex);
INT SetAttachDescription(INT iAttachIndex, LPCWSTR lpszAttachDescription);
char* secureblackbox_mailwriter_getattachdescription(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachdescription(void* lpObj, int attachindex, const char* lpszAttachDescription);
QString GetAttachDescription(int iAttachIndex);
int SetAttachDescription(int iAttachIndex, QString qsAttachDescription);

Default Value

""

Remarks

Textual description of the attachment.

This property maps to the Content-Description e-mail header field. Although the field is optional, the ability to associate descriptive information with a given body is often desirable. One example is specifying the title of an image using this property.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachFilename Property (MailWriter Class)

Specifies the name of the attachment file.

Syntax

ANSI (Cross Platform)
char* GetAttachFilename(int iAttachIndex);
int SetAttachFilename(int iAttachIndex, const char* lpszAttachFilename); Unicode (Windows) LPWSTR GetAttachFilename(INT iAttachIndex);
INT SetAttachFilename(INT iAttachIndex, LPCWSTR lpszAttachFilename);
char* secureblackbox_mailwriter_getattachfilename(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachfilename(void* lpObj, int attachindex, const char* lpszAttachFilename);
QString GetAttachFilename(int iAttachIndex);
int SetAttachFilename(int iAttachIndex, QString qsAttachFilename);

Default Value

""

Remarks

Specifies the name of the attachment file.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachHandle Property (MailWriter Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetAttachHandle(int iAttachIndex);
int SetAttachHandle(int iAttachIndex, int64 lAttachHandle); Unicode (Windows) LONG64 GetAttachHandle(INT iAttachIndex);
INT SetAttachHandle(INT iAttachIndex, LONG64 lAttachHandle);
int64 secureblackbox_mailwriter_getattachhandle(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachhandle(void* lpObj, int attachindex, int64 lAttachHandle);
qint64 GetAttachHandle(int iAttachIndex);
int SetAttachHandle(int iAttachIndex, qint64 lAttachHandle);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

Long64

AttachID Property (MailWriter Class)

Contains the attachment's unique identifier.

Syntax

ANSI (Cross Platform)
char* GetAttachID(int iAttachIndex);
int SetAttachID(int iAttachIndex, const char* lpszAttachID); Unicode (Windows) LPWSTR GetAttachID(INT iAttachIndex);
INT SetAttachID(INT iAttachIndex, LPCWSTR lpszAttachID);
char* secureblackbox_mailwriter_getattachid(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachid(void* lpObj, int attachindex, const char* lpszAttachID);
QString GetAttachID(int iAttachIndex);
int SetAttachID(int iAttachIndex, QString qsAttachID);

Default Value

""

Remarks

Contains the attachment's unique identifier.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachModificationDate Property (MailWriter Class)

Specifies the date and time of the file's last modification.

Syntax

ANSI (Cross Platform)
char* GetAttachModificationDate(int iAttachIndex);
int SetAttachModificationDate(int iAttachIndex, const char* lpszAttachModificationDate); Unicode (Windows) LPWSTR GetAttachModificationDate(INT iAttachIndex);
INT SetAttachModificationDate(INT iAttachIndex, LPCWSTR lpszAttachModificationDate);
char* secureblackbox_mailwriter_getattachmodificationdate(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachmodificationdate(void* lpObj, int attachindex, const char* lpszAttachModificationDate);
QString GetAttachModificationDate(int iAttachIndex);
int SetAttachModificationDate(int iAttachIndex, QString qsAttachModificationDate);

Default Value

""

Remarks

Specifies the date and time of the file's last modification.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachReadDate Property (MailWriter Class)

Specifies the file's last read date.

Syntax

ANSI (Cross Platform)
char* GetAttachReadDate(int iAttachIndex);
int SetAttachReadDate(int iAttachIndex, const char* lpszAttachReadDate); Unicode (Windows) LPWSTR GetAttachReadDate(INT iAttachIndex);
INT SetAttachReadDate(INT iAttachIndex, LPCWSTR lpszAttachReadDate);
char* secureblackbox_mailwriter_getattachreaddate(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachreaddate(void* lpObj, int attachindex, const char* lpszAttachReadDate);
QString GetAttachReadDate(int iAttachIndex);
int SetAttachReadDate(int iAttachIndex, QString qsAttachReadDate);

Default Value

""

Remarks

Specifies the file's last read date.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

String

AttachSize Property (MailWriter Class)

Attachment's size in bytes.

Syntax

ANSI (Cross Platform)
int64 GetAttachSize(int iAttachIndex);
int SetAttachSize(int iAttachIndex, int64 lAttachSize); Unicode (Windows) LONG64 GetAttachSize(INT iAttachIndex);
INT SetAttachSize(INT iAttachIndex, LONG64 lAttachSize);
int64 secureblackbox_mailwriter_getattachsize(void* lpObj, int attachindex);
int secureblackbox_mailwriter_setattachsize(void* lpObj, int attachindex, int64 lAttachSize);
qint64 GetAttachSize(int iAttachIndex);
int SetAttachSize(int iAttachIndex, qint64 lAttachSize);

Default Value

0

Remarks

Attachment's size in bytes.

The AttachIndex parameter specifies the index of the item in the array. The size of the array is controlled by the AttachCount property.

This property is not available at design time.

Data Type

Long64

BccAddrCount Property (MailWriter Class)

The number of records in the BccAddr arrays.

Syntax

ANSI (Cross Platform)
int GetBccAddrCount();
int SetBccAddrCount(int iBccAddrCount); Unicode (Windows) INT GetBccAddrCount();
INT SetBccAddrCount(INT iBccAddrCount);
int secureblackbox_mailwriter_getbccaddrcount(void* lpObj);
int secureblackbox_mailwriter_setbccaddrcount(void* lpObj, int iBccAddrCount);
int GetBccAddrCount();
int SetBccAddrCount(int iBccAddrCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at BccAddrCount - 1.

This property is not available at design time.

Data Type

Integer

BccAddrAddress Property (MailWriter Class)

Contains the e-mail address in the form of john@doe.

Syntax

ANSI (Cross Platform)
char* GetBccAddrAddress(int iBccAddrIndex);
int SetBccAddrAddress(int iBccAddrIndex, const char* lpszBccAddrAddress); Unicode (Windows) LPWSTR GetBccAddrAddress(INT iBccAddrIndex);
INT SetBccAddrAddress(INT iBccAddrIndex, LPCWSTR lpszBccAddrAddress);
char* secureblackbox_mailwriter_getbccaddraddress(void* lpObj, int bccaddrindex);
int secureblackbox_mailwriter_setbccaddraddress(void* lpObj, int bccaddrindex, const char* lpszBccAddrAddress);
QString GetBccAddrAddress(int iBccAddrIndex);
int SetBccAddrAddress(int iBccAddrIndex, QString qsBccAddrAddress);

Default Value

""

Remarks

Contains the e-mail address in the form of john@doe.com.

The BccAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the BccAddrCount property.

This property is not available at design time.

Data Type

String

BccAddrDisplayName Property (MailWriter Class)

Contains the friendly name of the user of this address, such as John Doe.

Syntax

ANSI (Cross Platform)
char* GetBccAddrDisplayName(int iBccAddrIndex);
int SetBccAddrDisplayName(int iBccAddrIndex, const char* lpszBccAddrDisplayName); Unicode (Windows) LPWSTR GetBccAddrDisplayName(INT iBccAddrIndex);
INT SetBccAddrDisplayName(INT iBccAddrIndex, LPCWSTR lpszBccAddrDisplayName);
char* secureblackbox_mailwriter_getbccaddrdisplayname(void* lpObj, int bccaddrindex);
int secureblackbox_mailwriter_setbccaddrdisplayname(void* lpObj, int bccaddrindex, const char* lpszBccAddrDisplayName);
QString GetBccAddrDisplayName(int iBccAddrIndex);
int SetBccAddrDisplayName(int iBccAddrIndex, QString qsBccAddrDisplayName);

Default Value

""

Remarks

Contains the friendly name of the user of this address, such as John Doe.

The BccAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the BccAddrCount property.

This property is not available at design time.

Data Type

String

BccAddrGroupName Property (MailWriter Class)

The name of the group this address belongs to.

Syntax

ANSI (Cross Platform)
char* GetBccAddrGroupName(int iBccAddrIndex);
int SetBccAddrGroupName(int iBccAddrIndex, const char* lpszBccAddrGroupName); Unicode (Windows) LPWSTR GetBccAddrGroupName(INT iBccAddrIndex);
INT SetBccAddrGroupName(INT iBccAddrIndex, LPCWSTR lpszBccAddrGroupName);
char* secureblackbox_mailwriter_getbccaddrgroupname(void* lpObj, int bccaddrindex);
int secureblackbox_mailwriter_setbccaddrgroupname(void* lpObj, int bccaddrindex, const char* lpszBccAddrGroupName);
QString GetBccAddrGroupName(int iBccAddrIndex);
int SetBccAddrGroupName(int iBccAddrIndex, QString qsBccAddrGroupName);

Default Value

""

Remarks

The name of the group this address belongs to.

The BccAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the BccAddrCount property.

This property is not available at design time.

Data Type

String

CcAddrCount Property (MailWriter Class)

The number of records in the CcAddr arrays.

Syntax

ANSI (Cross Platform)
int GetCcAddrCount();
int SetCcAddrCount(int iCcAddrCount); Unicode (Windows) INT GetCcAddrCount();
INT SetCcAddrCount(INT iCcAddrCount);
int secureblackbox_mailwriter_getccaddrcount(void* lpObj);
int secureblackbox_mailwriter_setccaddrcount(void* lpObj, int iCcAddrCount);
int GetCcAddrCount();
int SetCcAddrCount(int iCcAddrCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at CcAddrCount - 1.

This property is not available at design time.

Data Type

Integer

CcAddrAddress Property (MailWriter Class)

Contains the e-mail address in the form of john@doe.

Syntax

ANSI (Cross Platform)
char* GetCcAddrAddress(int iCcAddrIndex);
int SetCcAddrAddress(int iCcAddrIndex, const char* lpszCcAddrAddress); Unicode (Windows) LPWSTR GetCcAddrAddress(INT iCcAddrIndex);
INT SetCcAddrAddress(INT iCcAddrIndex, LPCWSTR lpszCcAddrAddress);
char* secureblackbox_mailwriter_getccaddraddress(void* lpObj, int ccaddrindex);
int secureblackbox_mailwriter_setccaddraddress(void* lpObj, int ccaddrindex, const char* lpszCcAddrAddress);
QString GetCcAddrAddress(int iCcAddrIndex);
int SetCcAddrAddress(int iCcAddrIndex, QString qsCcAddrAddress);

Default Value

""

Remarks

Contains the e-mail address in the form of john@doe.com.

The CcAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the CcAddrCount property.

This property is not available at design time.

Data Type

String

CcAddrDisplayName Property (MailWriter Class)

Contains the friendly name of the user of this address, such as John Doe.

Syntax

ANSI (Cross Platform)
char* GetCcAddrDisplayName(int iCcAddrIndex);
int SetCcAddrDisplayName(int iCcAddrIndex, const char* lpszCcAddrDisplayName); Unicode (Windows) LPWSTR GetCcAddrDisplayName(INT iCcAddrIndex);
INT SetCcAddrDisplayName(INT iCcAddrIndex, LPCWSTR lpszCcAddrDisplayName);
char* secureblackbox_mailwriter_getccaddrdisplayname(void* lpObj, int ccaddrindex);
int secureblackbox_mailwriter_setccaddrdisplayname(void* lpObj, int ccaddrindex, const char* lpszCcAddrDisplayName);
QString GetCcAddrDisplayName(int iCcAddrIndex);
int SetCcAddrDisplayName(int iCcAddrIndex, QString qsCcAddrDisplayName);

Default Value

""

Remarks

Contains the friendly name of the user of this address, such as John Doe.

The CcAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the CcAddrCount property.

This property is not available at design time.

Data Type

String

CcAddrGroupName Property (MailWriter Class)

The name of the group this address belongs to.

Syntax

ANSI (Cross Platform)
char* GetCcAddrGroupName(int iCcAddrIndex);
int SetCcAddrGroupName(int iCcAddrIndex, const char* lpszCcAddrGroupName); Unicode (Windows) LPWSTR GetCcAddrGroupName(INT iCcAddrIndex);
INT SetCcAddrGroupName(INT iCcAddrIndex, LPCWSTR lpszCcAddrGroupName);
char* secureblackbox_mailwriter_getccaddrgroupname(void* lpObj, int ccaddrindex);
int secureblackbox_mailwriter_setccaddrgroupname(void* lpObj, int ccaddrindex, const char* lpszCcAddrGroupName);
QString GetCcAddrGroupName(int iCcAddrIndex);
int SetCcAddrGroupName(int iCcAddrIndex, QString qsCcAddrGroupName);

Default Value

""

Remarks

The name of the group this address belongs to.

The CcAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the CcAddrCount property.

This property is not available at design time.

Data Type

String

Charset Property (MailWriter Class)

The charset to apply to Message .

Syntax

ANSI (Cross Platform)
char* GetCharset();
int SetCharset(const char* lpszCharset); Unicode (Windows) LPWSTR GetCharset();
INT SetCharset(LPCWSTR lpszCharset);
char* secureblackbox_mailwriter_getcharset(void* lpObj);
int secureblackbox_mailwriter_setcharset(void* lpObj, const char* lpszCharset);
QString GetCharset();
int SetCharset(QString qsCharset);

Default Value

"utf-8"

Remarks

Use this property to specify the character set to use in the message.

Data Type

String

EncryptionCertCount Property (MailWriter Class)

The number of records in the EncryptionCert arrays.

Syntax

ANSI (Cross Platform)
int GetEncryptionCertCount();
int SetEncryptionCertCount(int iEncryptionCertCount); Unicode (Windows) INT GetEncryptionCertCount();
INT SetEncryptionCertCount(INT iEncryptionCertCount);
int secureblackbox_mailwriter_getencryptioncertcount(void* lpObj);
int secureblackbox_mailwriter_setencryptioncertcount(void* lpObj, int iEncryptionCertCount);
int GetEncryptionCertCount();
int SetEncryptionCertCount(int iEncryptionCertCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at EncryptionCertCount - 1.

This property is not available at design time.

Data Type

Integer

EncryptionCertBytes Property (MailWriter Class)

Returns raw certificate data in DER format.

Syntax

ANSI (Cross Platform)
int GetEncryptionCertBytes(int iEncryptionCertIndex, char* &lpEncryptionCertBytes, int &lenEncryptionCertBytes);

Unicode (Windows)
INT GetEncryptionCertBytes(INT iEncryptionCertIndex, LPSTR &lpEncryptionCertBytes, INT &lenEncryptionCertBytes);
int secureblackbox_mailwriter_getencryptioncertbytes(void* lpObj, int encryptioncertindex, char** lpEncryptionCertBytes, int* lenEncryptionCertBytes);
QByteArray GetEncryptionCertBytes(int iEncryptionCertIndex);

Remarks

Returns raw certificate data in DER format.

The EncryptionCertIndex parameter specifies the index of the item in the array. The size of the array is controlled by the EncryptionCertCount property.

This property is read-only and not available at design time.

Data Type

Byte Array

EncryptionCertHandle Property (MailWriter Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetEncryptionCertHandle(int iEncryptionCertIndex);
int SetEncryptionCertHandle(int iEncryptionCertIndex, int64 lEncryptionCertHandle); Unicode (Windows) LONG64 GetEncryptionCertHandle(INT iEncryptionCertIndex);
INT SetEncryptionCertHandle(INT iEncryptionCertIndex, LONG64 lEncryptionCertHandle);
int64 secureblackbox_mailwriter_getencryptioncerthandle(void* lpObj, int encryptioncertindex);
int secureblackbox_mailwriter_setencryptioncerthandle(void* lpObj, int encryptioncertindex, int64 lEncryptionCertHandle);
qint64 GetEncryptionCertHandle(int iEncryptionCertIndex);
int SetEncryptionCertHandle(int iEncryptionCertIndex, qint64 lEncryptionCertHandle);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

The EncryptionCertIndex parameter specifies the index of the item in the array. The size of the array is controlled by the EncryptionCertCount property.

This property is not available at design time.

Data Type

Long64

ExternalCryptoAsyncDocumentID Property (MailWriter Class)

Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.

Syntax

ANSI (Cross Platform)
char* GetExternalCryptoAsyncDocumentID();
int SetExternalCryptoAsyncDocumentID(const char* lpszExternalCryptoAsyncDocumentID); Unicode (Windows) LPWSTR GetExternalCryptoAsyncDocumentID();
INT SetExternalCryptoAsyncDocumentID(LPCWSTR lpszExternalCryptoAsyncDocumentID);
char* secureblackbox_mailwriter_getexternalcryptoasyncdocumentid(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptoasyncdocumentid(void* lpObj, const char* lpszExternalCryptoAsyncDocumentID);
QString GetExternalCryptoAsyncDocumentID();
int SetExternalCryptoAsyncDocumentID(QString qsExternalCryptoAsyncDocumentID);

Default Value

""

Remarks

Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.

Use this property when working with multi-signature DCAuth requests and responses to uniquely identify documents signed within a larger batch. On the completion stage, this value helps the signing component identify the correct signature in the returned batch of responses.

If using batched requests, make sure to set this property to the same value on both pre-signing (SignAsyncBegin) and completion (SignAsyncEnd) stages.

Data Type

String

ExternalCryptoCustomParams Property (MailWriter Class)

Custom parameters to be passed to the signing service (uninterpreted).

Syntax

ANSI (Cross Platform)
char* GetExternalCryptoCustomParams();
int SetExternalCryptoCustomParams(const char* lpszExternalCryptoCustomParams); Unicode (Windows) LPWSTR GetExternalCryptoCustomParams();
INT SetExternalCryptoCustomParams(LPCWSTR lpszExternalCryptoCustomParams);
char* secureblackbox_mailwriter_getexternalcryptocustomparams(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptocustomparams(void* lpObj, const char* lpszExternalCryptoCustomParams);
QString GetExternalCryptoCustomParams();
int SetExternalCryptoCustomParams(QString qsExternalCryptoCustomParams);

Default Value

""

Remarks

Custom parameters to be passed to the signing service (uninterpreted).

This property is not available at design time.

Data Type

String

ExternalCryptoData Property (MailWriter Class)

Additional data to be included in the async state and mirrored back by the requestor.

Syntax

ANSI (Cross Platform)
char* GetExternalCryptoData();
int SetExternalCryptoData(const char* lpszExternalCryptoData); Unicode (Windows) LPWSTR GetExternalCryptoData();
INT SetExternalCryptoData(LPCWSTR lpszExternalCryptoData);
char* secureblackbox_mailwriter_getexternalcryptodata(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptodata(void* lpObj, const char* lpszExternalCryptoData);
QString GetExternalCryptoData();
int SetExternalCryptoData(QString qsExternalCryptoData);

Default Value

""

Remarks

Additional data to be included in the async state and mirrored back by the requestor

This property is not available at design time.

Data Type

String

ExternalCryptoExternalHashCalculation Property (MailWriter Class)

Specifies whether the message hash is to be calculated at the external endpoint.

Syntax

ANSI (Cross Platform)
int GetExternalCryptoExternalHashCalculation();
int SetExternalCryptoExternalHashCalculation(int bExternalCryptoExternalHashCalculation); Unicode (Windows) BOOL GetExternalCryptoExternalHashCalculation();
INT SetExternalCryptoExternalHashCalculation(BOOL bExternalCryptoExternalHashCalculation);
int secureblackbox_mailwriter_getexternalcryptoexternalhashcalculation(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptoexternalhashcalculation(void* lpObj, int bExternalCryptoExternalHashCalculation);
bool GetExternalCryptoExternalHashCalculation();
int SetExternalCryptoExternalHashCalculation(bool bExternalCryptoExternalHashCalculation);

Default Value

FALSE

Remarks

Specifies whether the message hash is to be calculated at the external endpoint. Please note that this mode is not supported by all components. In particular, components operating with larger objects (PDFSigner, CAdESSigner, XAdESSigner) do not support it.

Data Type

Boolean

ExternalCryptoHashAlgorithm Property (MailWriter Class)

Specifies the request's signature hash algorithm.

Syntax

ANSI (Cross Platform)
char* GetExternalCryptoHashAlgorithm();
int SetExternalCryptoHashAlgorithm(const char* lpszExternalCryptoHashAlgorithm); Unicode (Windows) LPWSTR GetExternalCryptoHashAlgorithm();
INT SetExternalCryptoHashAlgorithm(LPCWSTR lpszExternalCryptoHashAlgorithm);
char* secureblackbox_mailwriter_getexternalcryptohashalgorithm(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptohashalgorithm(void* lpObj, const char* lpszExternalCryptoHashAlgorithm);
QString GetExternalCryptoHashAlgorithm();
int SetExternalCryptoHashAlgorithm(QString qsExternalCryptoHashAlgorithm);

Default Value

"SHA256"

Remarks

Specifies the request's signature hash algorithm.

SB_HASH_ALGORITHM_SHA1SHA1
SB_HASH_ALGORITHM_SHA224SHA224
SB_HASH_ALGORITHM_SHA256SHA256
SB_HASH_ALGORITHM_SHA384SHA384
SB_HASH_ALGORITHM_SHA512SHA512
SB_HASH_ALGORITHM_MD2MD2
SB_HASH_ALGORITHM_MD4MD4
SB_HASH_ALGORITHM_MD5MD5
SB_HASH_ALGORITHM_RIPEMD160RIPEMD160
SB_HASH_ALGORITHM_CRC32CRC32
SB_HASH_ALGORITHM_SSL3SSL3
SB_HASH_ALGORITHM_GOST_R3411_1994GOST1994
SB_HASH_ALGORITHM_WHIRLPOOLWHIRLPOOL
SB_HASH_ALGORITHM_POLY1305POLY1305
SB_HASH_ALGORITHM_SHA3_224SHA3_224
SB_HASH_ALGORITHM_SHA3_256SHA3_256
SB_HASH_ALGORITHM_SHA3_384SHA3_384
SB_HASH_ALGORITHM_SHA3_512SHA3_512
SB_HASH_ALGORITHM_BLAKE2S_128BLAKE2S_128
SB_HASH_ALGORITHM_BLAKE2S_160BLAKE2S_160
SB_HASH_ALGORITHM_BLAKE2S_224BLAKE2S_224
SB_HASH_ALGORITHM_BLAKE2S_256BLAKE2S_256
SB_HASH_ALGORITHM_BLAKE2B_160BLAKE2B_160
SB_HASH_ALGORITHM_BLAKE2B_256BLAKE2B_256
SB_HASH_ALGORITHM_BLAKE2B_384BLAKE2B_384
SB_HASH_ALGORITHM_BLAKE2B_512BLAKE2B_512
SB_HASH_ALGORITHM_SHAKE_128SHAKE_128
SB_HASH_ALGORITHM_SHAKE_256SHAKE_256
SB_HASH_ALGORITHM_SHAKE_128_LENSHAKE_128_LEN
SB_HASH_ALGORITHM_SHAKE_256_LENSHAKE_256_LEN

Data Type

String

ExternalCryptoKeyID Property (MailWriter Class)

The ID of the pre-shared key used for DC request authentication.

Syntax

ANSI (Cross Platform)
char* GetExternalCryptoKeyID();
int SetExternalCryptoKeyID(const char* lpszExternalCryptoKeyID); Unicode (Windows) LPWSTR GetExternalCryptoKeyID();
INT SetExternalCryptoKeyID(LPCWSTR lpszExternalCryptoKeyID);
char* secureblackbox_mailwriter_getexternalcryptokeyid(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptokeyid(void* lpObj, const char* lpszExternalCryptoKeyID);
QString GetExternalCryptoKeyID();
int SetExternalCryptoKeyID(QString qsExternalCryptoKeyID);

Default Value

""

Remarks

The ID of the pre-shared key used for DC request authentication.

Asynchronous DCAuth-driven communication requires that parties authenticate each other with a secret pre-shared cryptographic key. This provides extra protection layer for the protocol and diminishes the risk of private key becoming abused by foreign parties. Use this property to provide the pre-shared key identifier, and use ExternalCryptoKeySecret to pass the key itself.

The same KeyID/KeySecret pair should be used on the DCAuth side for the signing requests to be accepted.

Note: The KeyID/KeySecret scheme is very similar to the AuthKey scheme used in various Cloud service providers to authenticate users.

Example: signer.ExternalCrypto.KeyID = "MainSigningKey"; signer.ExternalCrypto.KeySecret = "abcdef0123456789";

Data Type

String

ExternalCryptoKeySecret Property (MailWriter Class)

The pre-shared key used for DC request authentication.

Syntax

ANSI (Cross Platform)
char* GetExternalCryptoKeySecret();
int SetExternalCryptoKeySecret(const char* lpszExternalCryptoKeySecret); Unicode (Windows) LPWSTR GetExternalCryptoKeySecret();
INT SetExternalCryptoKeySecret(LPCWSTR lpszExternalCryptoKeySecret);
char* secureblackbox_mailwriter_getexternalcryptokeysecret(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptokeysecret(void* lpObj, const char* lpszExternalCryptoKeySecret);
QString GetExternalCryptoKeySecret();
int SetExternalCryptoKeySecret(QString qsExternalCryptoKeySecret);

Default Value

""

Remarks

The pre-shared key used for DC request authentication. This key must be set and match the key used by the DCAuth counterpart for the scheme to work.

Read more about configuring authentication in the ExternalCryptoKeyID topic.

Data Type

String

ExternalCryptoMethod Property (MailWriter Class)

Specifies the asynchronous signing method.

Syntax

ANSI (Cross Platform)
int GetExternalCryptoMethod();
int SetExternalCryptoMethod(int iExternalCryptoMethod); Unicode (Windows) INT GetExternalCryptoMethod();
INT SetExternalCryptoMethod(INT iExternalCryptoMethod);

Possible Values

ASMD_PKCS1(0), 
ASMD_PKCS7(1)
int secureblackbox_mailwriter_getexternalcryptomethod(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptomethod(void* lpObj, int iExternalCryptoMethod);
int GetExternalCryptoMethod();
int SetExternalCryptoMethod(int iExternalCryptoMethod);

Default Value

0

Remarks

Specifies the asynchronous signing method. This is typically defined by the DC server capabilities and setup.

Available options:

asmdPKCS10
asmdPKCS71

Data Type

Integer

ExternalCryptoMode Property (MailWriter Class)

Specifies the external cryptography mode.

Syntax

ANSI (Cross Platform)
int GetExternalCryptoMode();
int SetExternalCryptoMode(int iExternalCryptoMode); Unicode (Windows) INT GetExternalCryptoMode();
INT SetExternalCryptoMode(INT iExternalCryptoMode);

Possible Values

ECM_DEFAULT(0), 
ECM_DISABLED(1),
ECM_GENERIC(2),
ECM_DCAUTH(3),
ECM_DCAUTH_JSON(4)
int secureblackbox_mailwriter_getexternalcryptomode(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptomode(void* lpObj, int iExternalCryptoMode);
int GetExternalCryptoMode();
int SetExternalCryptoMode(int iExternalCryptoMode);

Default Value

0

Remarks

Specifies the external cryptography mode.

Available options:

ecmDefaultThe default value (0)
ecmDisabledDo not use DC or external signing (1)
ecmGenericGeneric external signing with OnExternalSign event (2)
ecmDCAuthDCAuth signing (3)
ecmDCAuthJSONDCAuth signing in JSON format (4)

This property is not available at design time.

Data Type

Integer

ExternalCryptoPublicKeyAlgorithm Property (MailWriter Class)

Provide public key algorithm here if the certificate is not available on the pre-signing stage.

Syntax

ANSI (Cross Platform)
char* GetExternalCryptoPublicKeyAlgorithm();
int SetExternalCryptoPublicKeyAlgorithm(const char* lpszExternalCryptoPublicKeyAlgorithm); Unicode (Windows) LPWSTR GetExternalCryptoPublicKeyAlgorithm();
INT SetExternalCryptoPublicKeyAlgorithm(LPCWSTR lpszExternalCryptoPublicKeyAlgorithm);
char* secureblackbox_mailwriter_getexternalcryptopublickeyalgorithm(void* lpObj);
int secureblackbox_mailwriter_setexternalcryptopublickeyalgorithm(void* lpObj, const char* lpszExternalCryptoPublicKeyAlgorithm);
QString GetExternalCryptoPublicKeyAlgorithm();
int SetExternalCryptoPublicKeyAlgorithm(QString qsExternalCryptoPublicKeyAlgorithm);

Default Value

""

Remarks

Provide public key algorithm here if the certificate is not available on the pre-signing stage.

SB_CERT_ALGORITHM_ID_RSA_ENCRYPTIONrsaEncryption
SB_CERT_ALGORITHM_MD2_RSA_ENCRYPTIONmd2withRSAEncryption
SB_CERT_ALGORITHM_MD5_RSA_ENCRYPTIONmd5withRSAEncryption
SB_CERT_ALGORITHM_SHA1_RSA_ENCRYPTIONsha1withRSAEncryption
SB_CERT_ALGORITHM_ID_DSAid-dsa
SB_CERT_ALGORITHM_ID_DSA_SHA1id-dsa-with-sha1
SB_CERT_ALGORITHM_DH_PUBLICdhpublicnumber
SB_CERT_ALGORITHM_SHA224_RSA_ENCRYPTIONsha224WithRSAEncryption
SB_CERT_ALGORITHM_SHA256_RSA_ENCRYPTIONsha256WithRSAEncryption
SB_CERT_ALGORITHM_SHA384_RSA_ENCRYPTIONsha384WithRSAEncryption
SB_CERT_ALGORITHM_SHA512_RSA_ENCRYPTIONsha512WithRSAEncryption
SB_CERT_ALGORITHM_ID_RSAPSSid-RSASSA-PSS
SB_CERT_ALGORITHM_ID_RSAOAEPid-RSAES-OAEP
SB_CERT_ALGORITHM_RSASIGNATURE_RIPEMD160ripemd160withRSA
SB_CERT_ALGORITHM_ID_ELGAMALelGamal
SB_CERT_ALGORITHM_SHA1_ECDSAecdsa-with-SHA1
SB_CERT_ALGORITHM_RECOMMENDED_ECDSAecdsa-recommended
SB_CERT_ALGORITHM_SHA224_ECDSAecdsa-with-SHA224
SB_CERT_ALGORITHM_SHA256_ECDSAecdsa-with-SHA256
SB_CERT_ALGORITHM_SHA384_ECDSAecdsa-with-SHA384
SB_CERT_ALGORITHM_SHA512_ECDSAecdsa-with-SHA512
SB_CERT_ALGORITHM_ECid-ecPublicKey
SB_CERT_ALGORITHM_SPECIFIED_ECDSAecdsa-specified
SB_CERT_ALGORITHM_GOST_R3410_1994id-GostR3410-94
SB_CERT_ALGORITHM_GOST_R3410_2001id-GostR3410-2001
SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_1994id-GostR3411-94-with-GostR3410-94
SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_2001id-GostR3411-94-with-GostR3410-2001
SB_CERT_ALGORITHM_SHA1_ECDSA_PLAINecdsa-plain-SHA1
SB_CERT_ALGORITHM_SHA224_ECDSA_PLAINecdsa-plain-SHA224
SB_CERT_ALGORITHM_SHA256_ECDSA_PLAINecdsa-plain-SHA256
SB_CERT_ALGORITHM_SHA384_ECDSA_PLAINecdsa-plain-SHA384
SB_CERT_ALGORITHM_SHA512_ECDSA_PLAINecdsa-plain-SHA512
SB_CERT_ALGORITHM_RIPEMD160_ECDSA_PLAINecdsa-plain-RIPEMD160
SB_CERT_ALGORITHM_WHIRLPOOL_RSA_ENCRYPTIONwhirlpoolWithRSAEncryption
SB_CERT_ALGORITHM_ID_DSA_SHA224id-dsa-with-sha224
SB_CERT_ALGORITHM_ID_DSA_SHA256id-dsa-with-sha256
SB_CERT_ALGORITHM_SHA3_224_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-224
SB_CERT_ALGORITHM_SHA3_256_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-256
SB_CERT_ALGORITHM_SHA3_384_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-384
SB_CERT_ALGORITHM_SHA3_512_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-512
SB_CERT_ALGORITHM_SHA3_224_ECDSAid-ecdsa-with-sha3-224
SB_CERT_ALGORITHM_SHA3_256_ECDSAid-ecdsa-with-sha3-256
SB_CERT_ALGORITHM_SHA3_384_ECDSAid-ecdsa-with-sha3-384
SB_CERT_ALGORITHM_SHA3_512_ECDSAid-ecdsa-with-sha3-512
SB_CERT_ALGORITHM_SHA3_224_ECDSA_PLAINid-ecdsa-plain-with-sha3-224
SB_CERT_ALGORITHM_SHA3_256_ECDSA_PLAINid-ecdsa-plain-with-sha3-256
SB_CERT_ALGORITHM_SHA3_384_ECDSA_PLAINid-ecdsa-plain-with-sha3-384
SB_CERT_ALGORITHM_SHA3_512_ECDSA_PLAINid-ecdsa-plain-with-sha3-512
SB_CERT_ALGORITHM_ID_DSA_SHA3_224id-dsa-with-sha3-224
SB_CERT_ALGORITHM_ID_DSA_SHA3_256id-dsa-with-sha3-256
SB_CERT_ALGORITHM_BLAKE2S_128_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s128
SB_CERT_ALGORITHM_BLAKE2S_160_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s160
SB_CERT_ALGORITHM_BLAKE2S_224_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s224
SB_CERT_ALGORITHM_BLAKE2S_256_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s256
SB_CERT_ALGORITHM_BLAKE2B_160_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b160
SB_CERT_ALGORITHM_BLAKE2B_256_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b256
SB_CERT_ALGORITHM_BLAKE2B_384_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b384
SB_CERT_ALGORITHM_BLAKE2B_512_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b512
SB_CERT_ALGORITHM_BLAKE2S_128_ECDSAid-ecdsa-with-blake2s128
SB_CERT_ALGORITHM_BLAKE2S_160_ECDSAid-ecdsa-with-blake2s160
SB_CERT_ALGORITHM_BLAKE2S_224_ECDSAid-ecdsa-with-blake2s224
SB_CERT_ALGORITHM_BLAKE2S_256_ECDSAid-ecdsa-with-blake2s256
SB_CERT_ALGORITHM_BLAKE2B_160_ECDSAid-ecdsa-with-blake2b160
SB_CERT_ALGORITHM_BLAKE2B_256_ECDSAid-ecdsa-with-blake2b256
SB_CERT_ALGORITHM_BLAKE2B_384_ECDSAid-ecdsa-with-blake2b384
SB_CERT_ALGORITHM_BLAKE2B_512_ECDSAid-ecdsa-with-blake2b512
SB_CERT_ALGORITHM_BLAKE2S_128_ECDSA_PLAINid-ecdsa-plain-with-blake2s128
SB_CERT_ALGORITHM_BLAKE2S_160_ECDSA_PLAINid-ecdsa-plain-with-blake2s160
SB_CERT_ALGORITHM_BLAKE2S_224_ECDSA_PLAINid-ecdsa-plain-with-blake2s224
SB_CERT_ALGORITHM_BLAKE2S_256_ECDSA_PLAINid-ecdsa-plain-with-blake2s256
SB_CERT_ALGORITHM_BLAKE2B_160_ECDSA_PLAINid-ecdsa-plain-with-blake2b160
SB_CERT_ALGORITHM_BLAKE2B_256_ECDSA_PLAINid-ecdsa-plain-with-blake2b256
SB_CERT_ALGORITHM_BLAKE2B_384_ECDSA_PLAINid-ecdsa-plain-with-blake2b384
SB_CERT_ALGORITHM_BLAKE2B_512_ECDSA_PLAINid-ecdsa-plain-with-blake2b512
SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_224id-dsa-with-blake2s224
SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_256id-dsa-with-blake2s256
SB_CERT_ALGORITHM_EDDSA_ED25519id-Ed25519
SB_CERT_ALGORITHM_EDDSA_ED448id-Ed448
SB_CERT_ALGORITHM_EDDSA_ED25519_PHid-Ed25519ph
SB_CERT_ALGORITHM_EDDSA_ED448_PHid-Ed448ph
SB_CERT_ALGORITHM_EDDSAid-EdDSA
SB_CERT_ALGORITHM_EDDSA_SIGNATUREid-EdDSA-sig

Data Type

String

FIPSMode Property (MailWriter Class)

Reserved.

Syntax

ANSI (Cross Platform)
int GetFIPSMode();
int SetFIPSMode(int bFIPSMode); Unicode (Windows) BOOL GetFIPSMode();
INT SetFIPSMode(BOOL bFIPSMode);
int secureblackbox_mailwriter_getfipsmode(void* lpObj);
int secureblackbox_mailwriter_setfipsmode(void* lpObj, int bFIPSMode);
bool GetFIPSMode();
int SetFIPSMode(bool bFIPSMode);

Default Value

FALSE

Remarks

This property is reserved for future use.

Data Type

Boolean

FromAddrCount Property (MailWriter Class)

The number of records in the FromAddr arrays.

Syntax

ANSI (Cross Platform)
int GetFromAddrCount();
int SetFromAddrCount(int iFromAddrCount); Unicode (Windows) INT GetFromAddrCount();
INT SetFromAddrCount(INT iFromAddrCount);
int secureblackbox_mailwriter_getfromaddrcount(void* lpObj);
int secureblackbox_mailwriter_setfromaddrcount(void* lpObj, int iFromAddrCount);
int GetFromAddrCount();
int SetFromAddrCount(int iFromAddrCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at FromAddrCount - 1.

This property is not available at design time.

Data Type

Integer

FromAddrAddress Property (MailWriter Class)

Contains the e-mail address in the form of john@doe.

Syntax

ANSI (Cross Platform)
char* GetFromAddrAddress(int iFromAddrIndex);
int SetFromAddrAddress(int iFromAddrIndex, const char* lpszFromAddrAddress); Unicode (Windows) LPWSTR GetFromAddrAddress(INT iFromAddrIndex);
INT SetFromAddrAddress(INT iFromAddrIndex, LPCWSTR lpszFromAddrAddress);
char* secureblackbox_mailwriter_getfromaddraddress(void* lpObj, int fromaddrindex);
int secureblackbox_mailwriter_setfromaddraddress(void* lpObj, int fromaddrindex, const char* lpszFromAddrAddress);
QString GetFromAddrAddress(int iFromAddrIndex);
int SetFromAddrAddress(int iFromAddrIndex, QString qsFromAddrAddress);

Default Value

""

Remarks

Contains the e-mail address in the form of john@doe.com.

The FromAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the FromAddrCount property.

This property is not available at design time.

Data Type

String

FromAddrDisplayName Property (MailWriter Class)

Contains the friendly name of the user of this address, such as John Doe.

Syntax

ANSI (Cross Platform)
char* GetFromAddrDisplayName(int iFromAddrIndex);
int SetFromAddrDisplayName(int iFromAddrIndex, const char* lpszFromAddrDisplayName); Unicode (Windows) LPWSTR GetFromAddrDisplayName(INT iFromAddrIndex);
INT SetFromAddrDisplayName(INT iFromAddrIndex, LPCWSTR lpszFromAddrDisplayName);
char* secureblackbox_mailwriter_getfromaddrdisplayname(void* lpObj, int fromaddrindex);
int secureblackbox_mailwriter_setfromaddrdisplayname(void* lpObj, int fromaddrindex, const char* lpszFromAddrDisplayName);
QString GetFromAddrDisplayName(int iFromAddrIndex);
int SetFromAddrDisplayName(int iFromAddrIndex, QString qsFromAddrDisplayName);

Default Value

""

Remarks

Contains the friendly name of the user of this address, such as John Doe.

The FromAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the FromAddrCount property.

This property is not available at design time.

Data Type

String

FromAddrGroupName Property (MailWriter Class)

The name of the group this address belongs to.

Syntax

ANSI (Cross Platform)
char* GetFromAddrGroupName(int iFromAddrIndex);
int SetFromAddrGroupName(int iFromAddrIndex, const char* lpszFromAddrGroupName); Unicode (Windows) LPWSTR GetFromAddrGroupName(INT iFromAddrIndex);
INT SetFromAddrGroupName(INT iFromAddrIndex, LPCWSTR lpszFromAddrGroupName);
char* secureblackbox_mailwriter_getfromaddrgroupname(void* lpObj, int fromaddrindex);
int secureblackbox_mailwriter_setfromaddrgroupname(void* lpObj, int fromaddrindex, const char* lpszFromAddrGroupName);
QString GetFromAddrGroupName(int iFromAddrIndex);
int SetFromAddrGroupName(int iFromAddrIndex, QString qsFromAddrGroupName);

Default Value

""

Remarks

The name of the group this address belongs to.

The FromAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the FromAddrCount property.

This property is not available at design time.

Data Type

String

HeaderEncoding Property (MailWriter Class)

The encoding to be applied to the message header.

Syntax

ANSI (Cross Platform)
int GetHeaderEncoding();
int SetHeaderEncoding(int iHeaderEncoding); Unicode (Windows) INT GetHeaderEncoding();
INT SetHeaderEncoding(INT iHeaderEncoding);

Possible Values

ME_AUTO(0), 
ME_8BIT(1),
ME_BASE_64(2),
ME_QUOTED_PRINTABLE(3)
int secureblackbox_mailwriter_getheaderencoding(void* lpObj);
int secureblackbox_mailwriter_setheaderencoding(void* lpObj, int iHeaderEncoding);
int GetHeaderEncoding();
int SetHeaderEncoding(int iHeaderEncoding);

Default Value

0

Remarks

Use this property to specify the encoding to use with the message header.

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Data Type

Integer

Mailer Property (MailWriter Class)

The name of the software used to compose and/or send the message.

Syntax

ANSI (Cross Platform)
char* GetMailer();
int SetMailer(const char* lpszMailer); Unicode (Windows) LPWSTR GetMailer();
INT SetMailer(LPCWSTR lpszMailer);
char* secureblackbox_mailwriter_getmailer(void* lpObj);
int secureblackbox_mailwriter_setmailer(void* lpObj, const char* lpszMailer);
QString GetMailer();
int SetMailer(QString qsMailer);

Default Value

""

Remarks

Use this property to specify the software that was used to compose and send this message.

Data Type

String

MsgAttachmentCount Property (MailWriter Class)

Returns the number of attachments in this message.

Syntax

ANSI (Cross Platform)
int GetMsgAttachmentCount();

Unicode (Windows)
INT GetMsgAttachmentCount();
int secureblackbox_mailwriter_getmsgattachmentcount(void* lpObj);
int GetMsgAttachmentCount();

Default Value

0

Remarks

Returns the number of attachments in this message.

This property is read-only and not available at design time.

Data Type

Integer

MsgBcc Property (MailWriter Class)

The contents of the BCC header property.

Syntax

ANSI (Cross Platform)
char* GetMsgBcc();
int SetMsgBcc(const char* lpszMsgBcc); Unicode (Windows) LPWSTR GetMsgBcc();
INT SetMsgBcc(LPCWSTR lpszMsgBcc);
char* secureblackbox_mailwriter_getmsgbcc(void* lpObj);
int secureblackbox_mailwriter_setmsgbcc(void* lpObj, const char* lpszMsgBcc);
QString GetMsgBcc();
int SetMsgBcc(QString qsMsgBcc);

Default Value

""

Remarks

The contents of the BCC header field.

The BCC header field contains the addresses of secondary recipients of the message whose addresses are not to be revealed to other recipients of the message. Mail servers remove the BCC header when processing the message and use its value for dispatching the message only.

This property is not available at design time.

Data Type

String

MsgCc Property (MailWriter Class)

The value of the CC header property.

Syntax

ANSI (Cross Platform)
char* GetMsgCc();
int SetMsgCc(const char* lpszMsgCc); Unicode (Windows) LPWSTR GetMsgCc();
INT SetMsgCc(LPCWSTR lpszMsgCc);
char* secureblackbox_mailwriter_getmsgcc(void* lpObj);
int secureblackbox_mailwriter_setmsgcc(void* lpObj, const char* lpszMsgCc);
QString GetMsgCc();
int SetMsgCc(QString qsMsgCc);

Default Value

""

Remarks

The value of the CC header field.

The CC field contains the addresses of secondary recipients of the message.

This property is not available at design time.

Data Type

String

MsgComments Property (MailWriter Class)

Contains additional information about the message body.

Syntax

ANSI (Cross Platform)
char* GetMsgComments();
int SetMsgComments(const char* lpszMsgComments); Unicode (Windows) LPWSTR GetMsgComments();
INT SetMsgComments(LPCWSTR lpszMsgComments);
char* secureblackbox_mailwriter_getmsgcomments(void* lpObj);
int secureblackbox_mailwriter_setmsgcomments(void* lpObj, const char* lpszMsgComments);
QString GetMsgComments();
int SetMsgComments(QString qsMsgComments);

Default Value

""

Remarks

Contains additional information about the message body.

This property is not available at design time.

Data Type

String

MsgDate Property (MailWriter Class)

The date and time when the message entered the mail delivery system.

Syntax

ANSI (Cross Platform)
char* GetMsgDate();
int SetMsgDate(const char* lpszMsgDate); Unicode (Windows) LPWSTR GetMsgDate();
INT SetMsgDate(LPCWSTR lpszMsgDate);
char* secureblackbox_mailwriter_getmsgdate(void* lpObj);
int secureblackbox_mailwriter_setmsgdate(void* lpObj, const char* lpszMsgDate);
QString GetMsgDate();
int SetMsgDate(QString qsMsgDate);

Default Value

""

Remarks

The date and time when the message entered the mail delivery system.

This field contains the date and time at which the creator of the message posted the message to the mail delivery system.

The date is returned and accepted in UTC time zone.

This property is not available at design time.

Data Type

String

MsgDeliveryReceipt Property (MailWriter Class)

Enables delivery notification.

Syntax

ANSI (Cross Platform)
int GetMsgDeliveryReceipt();
int SetMsgDeliveryReceipt(int bMsgDeliveryReceipt); Unicode (Windows) BOOL GetMsgDeliveryReceipt();
INT SetMsgDeliveryReceipt(BOOL bMsgDeliveryReceipt);
int secureblackbox_mailwriter_getmsgdeliveryreceipt(void* lpObj);
int secureblackbox_mailwriter_setmsgdeliveryreceipt(void* lpObj, int bMsgDeliveryReceipt);
bool GetMsgDeliveryReceipt();
int SetMsgDeliveryReceipt(bool bMsgDeliveryReceipt);

Default Value

FALSE

Remarks

Enables delivery notification.

This property is not available at design time.

Data Type

Boolean

MsgFrom Property (MailWriter Class)

Contains the value of the From header property.

Syntax

ANSI (Cross Platform)
char* GetMsgFrom();
int SetMsgFrom(const char* lpszMsgFrom); Unicode (Windows) LPWSTR GetMsgFrom();
INT SetMsgFrom(LPCWSTR lpszMsgFrom);
char* secureblackbox_mailwriter_getmsgfrom(void* lpObj);
int secureblackbox_mailwriter_setmsgfrom(void* lpObj, const char* lpszMsgFrom);
QString GetMsgFrom();
int SetMsgFrom(QString qsMsgFrom);

Default Value

""

Remarks

Contains the value of the From header field.

This field contains the address(es) of the message author(s). If the actual sender is not the author of the message, use MsgSender to specify the sender separately.

This property is not available at design time.

Data Type

String

MsgHandle Property (MailWriter Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetMsgHandle();
int SetMsgHandle(int64 lMsgHandle); Unicode (Windows) LONG64 GetMsgHandle();
INT SetMsgHandle(LONG64 lMsgHandle);
int64 secureblackbox_mailwriter_getmsghandle(void* lpObj);
int secureblackbox_mailwriter_setmsghandle(void* lpObj, int64 lMsgHandle);
qint64 GetMsgHandle();
int SetMsgHandle(qint64 lMsgHandle);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

This property is not available at design time.

Data Type

Long64

MsgHtmlText Property (MailWriter Class)

The HTML version of the message.

Syntax

ANSI (Cross Platform)
char* GetMsgHtmlText();
int SetMsgHtmlText(const char* lpszMsgHtmlText); Unicode (Windows) LPWSTR GetMsgHtmlText();
INT SetMsgHtmlText(LPCWSTR lpszMsgHtmlText);
char* secureblackbox_mailwriter_getmsghtmltext(void* lpObj);
int secureblackbox_mailwriter_setmsghtmltext(void* lpObj, const char* lpszMsgHtmlText);
QString GetMsgHtmlText();
int SetMsgHtmlText(QString qsMsgHtmlText);

Default Value

""

Remarks

The HTML version of the message.

This property is not available at design time.

Data Type

String

MsgID Property (MailWriter Class)

The contents of the Message-ID header property.

Syntax

ANSI (Cross Platform)
char* GetMsgID();
int SetMsgID(const char* lpszMsgID); Unicode (Windows) LPWSTR GetMsgID();
INT SetMsgID(LPCWSTR lpszMsgID);
char* secureblackbox_mailwriter_getmsgid(void* lpObj);
int secureblackbox_mailwriter_setmsgid(void* lpObj, const char* lpszMsgID);
QString GetMsgID();
int SetMsgID(QString qsMsgID);

Default Value

""

Remarks

The contents of the Message-ID header field.

This field contains a unique identifier that refers to a particular version of this message.

This property is not available at design time.

Data Type

String

MsgInReplyTo Property (MailWriter Class)

The value of the In-Reply-To header property.

Syntax

ANSI (Cross Platform)
char* GetMsgInReplyTo();
int SetMsgInReplyTo(const char* lpszMsgInReplyTo); Unicode (Windows) LPWSTR GetMsgInReplyTo();
INT SetMsgInReplyTo(LPCWSTR lpszMsgInReplyTo);
char* secureblackbox_mailwriter_getmsginreplyto(void* lpObj);
int secureblackbox_mailwriter_setmsginreplyto(void* lpObj, const char* lpszMsgInReplyTo);
QString GetMsgInReplyTo();
int SetMsgInReplyTo(QString qsMsgInReplyTo);

Default Value

""

Remarks

The value of the In-Reply-To header field.

A reply message should have the "In-Reply-To:" header field which may be used to identify the message (or messages) to which the new message is a reply.

This property is not available at design time.

Data Type

String

MsgKeywords Property (MailWriter Class)

The value of the Keywords header property.

Syntax

ANSI (Cross Platform)
char* GetMsgKeywords();
int SetMsgKeywords(const char* lpszMsgKeywords); Unicode (Windows) LPWSTR GetMsgKeywords();
INT SetMsgKeywords(LPCWSTR lpszMsgKeywords);
char* secureblackbox_mailwriter_getmsgkeywords(void* lpObj);
int secureblackbox_mailwriter_setmsgkeywords(void* lpObj, const char* lpszMsgKeywords);
QString GetMsgKeywords();
int SetMsgKeywords(QString qsMsgKeywords);

Default Value

""

Remarks

The value of the Keywords header field.

This field can be used to add some important words and phrases that might be useful for the recipient.

This property is not available at design time.

Data Type

String

MsgMailer Property (MailWriter Class)

The name of the software that was used to send the message.

Syntax

ANSI (Cross Platform)
char* GetMsgMailer();

Unicode (Windows)
LPWSTR GetMsgMailer();
char* secureblackbox_mailwriter_getmsgmailer(void* lpObj);
QString GetMsgMailer();

Default Value

""

Remarks

The name of the software that was used to send the message.

This property is read-only and not available at design time.

Data Type

String

MsgPlainText Property (MailWriter Class)

The plain text version of the message.

Syntax

ANSI (Cross Platform)
char* GetMsgPlainText();
int SetMsgPlainText(const char* lpszMsgPlainText); Unicode (Windows) LPWSTR GetMsgPlainText();
INT SetMsgPlainText(LPCWSTR lpszMsgPlainText);
char* secureblackbox_mailwriter_getmsgplaintext(void* lpObj);
int secureblackbox_mailwriter_setmsgplaintext(void* lpObj, const char* lpszMsgPlainText);
QString GetMsgPlainText();
int SetMsgPlainText(QString qsMsgPlainText);

Default Value

""

Remarks

The plain text version of the message.

This property is not available at design time.

Data Type

String

MsgPriority Property (MailWriter Class)

Specifies the message priority.

Syntax

ANSI (Cross Platform)
int GetMsgPriority();
int SetMsgPriority(int iMsgPriority); Unicode (Windows) INT GetMsgPriority();
INT SetMsgPriority(INT iMsgPriority);

Possible Values

MP_LOWEST(0), 
MP_LOW(1),
MP_NORMAL(2),
MP_HIGH(3),
MP_HIGHEST(4)
int secureblackbox_mailwriter_getmsgpriority(void* lpObj);
int secureblackbox_mailwriter_setmsgpriority(void* lpObj, int iMsgPriority);
int GetMsgPriority();
int SetMsgPriority(int iMsgPriority);

Default Value

2

Remarks

Specifies the message priority.

Available options:

mpLowest0
mpLow1
mpNormal2
mpHigh3
mpHighest4

This property is not available at design time.

Data Type

Integer

MsgReadReceipt Property (MailWriter Class)

Enables a read notification.

Syntax

ANSI (Cross Platform)
int GetMsgReadReceipt();
int SetMsgReadReceipt(int bMsgReadReceipt); Unicode (Windows) BOOL GetMsgReadReceipt();
INT SetMsgReadReceipt(BOOL bMsgReadReceipt);
int secureblackbox_mailwriter_getmsgreadreceipt(void* lpObj);
int secureblackbox_mailwriter_setmsgreadreceipt(void* lpObj, int bMsgReadReceipt);
bool GetMsgReadReceipt();
int SetMsgReadReceipt(bool bMsgReadReceipt);

Default Value

FALSE

Remarks

Enables a read notification.

This property is not available at design time.

Data Type

Boolean

MsgReferences Property (MailWriter Class)

The value of the References header property.

Syntax

ANSI (Cross Platform)
char* GetMsgReferences();
int SetMsgReferences(const char* lpszMsgReferences); Unicode (Windows) LPWSTR GetMsgReferences();
INT SetMsgReferences(LPCWSTR lpszMsgReferences);
char* secureblackbox_mailwriter_getmsgreferences(void* lpObj);
int secureblackbox_mailwriter_setmsgreferences(void* lpObj, const char* lpszMsgReferences);
QString GetMsgReferences();
int SetMsgReferences(QString qsMsgReferences);

Default Value

""

Remarks

The value of the References header field.

A reply message should include a "References:" header field which may be used to identify the "conversation thread". If the initial message is a reply itself, the References of the reply contain combined content of its "References:", "InReplyTo:" and "MessageID:" fields, subject to their presence in the original message.

This property is not available at design time.

Data Type

String

MsgReplyTo Property (MailWriter Class)

The value of the Reply-To header property.

Syntax

ANSI (Cross Platform)
char* GetMsgReplyTo();
int SetMsgReplyTo(const char* lpszMsgReplyTo); Unicode (Windows) LPWSTR GetMsgReplyTo();
INT SetMsgReplyTo(LPCWSTR lpszMsgReplyTo);
char* secureblackbox_mailwriter_getmsgreplyto(void* lpObj);
int secureblackbox_mailwriter_setmsgreplyto(void* lpObj, const char* lpszMsgReplyTo);
QString GetMsgReplyTo();
int SetMsgReplyTo(QString qsMsgReplyTo);

Default Value

""

Remarks

The value of the Reply-To header field.

This field contains the addresses to which the replies to this message should be sent. This field is optional. If not specified, the replies must be sent to the addresses specified in the MsgFrom field.

This property is not available at design time.

Data Type

String

MsgReturnPath Property (MailWriter Class)

The value of the Return-Path header property.

Syntax

ANSI (Cross Platform)
char* GetMsgReturnPath();
int SetMsgReturnPath(const char* lpszMsgReturnPath); Unicode (Windows) LPWSTR GetMsgReturnPath();
INT SetMsgReturnPath(LPCWSTR lpszMsgReturnPath);
char* secureblackbox_mailwriter_getmsgreturnpath(void* lpObj);
int secureblackbox_mailwriter_setmsgreturnpath(void* lpObj, const char* lpszMsgReturnPath);
QString GetMsgReturnPath();
int SetMsgReturnPath(QString qsMsgReturnPath);

Default Value

""

Remarks

The value of the Return-Path header field.

This field contains the address to which this message shall be returned in case of unsuccessful delivery.

This property is not available at design time.

Data Type

String

MsgSender Property (MailWriter Class)

The value of the Sender header property.

Syntax

ANSI (Cross Platform)
char* GetMsgSender();
int SetMsgSender(const char* lpszMsgSender); Unicode (Windows) LPWSTR GetMsgSender();
INT SetMsgSender(LPCWSTR lpszMsgSender);
char* secureblackbox_mailwriter_getmsgsender(void* lpObj);
int secureblackbox_mailwriter_setmsgsender(void* lpObj, const char* lpszMsgSender);
QString GetMsgSender();
int SetMsgSender(QString qsMsgSender);

Default Value

""

Remarks

The value of the Sender header field.

This field specifies the mailbox of the agent responsible for the actual transmission of this message. If the originator of the message can be indicated by a single mailbox and both the author and the transmitter are identical, the "Sender:" field is deemed excessive and should not be used.

This property is not available at design time.

Data Type

String

MsgSendTo Property (MailWriter Class)

The value of the To header property.

Syntax

ANSI (Cross Platform)
char* GetMsgSendTo();
int SetMsgSendTo(const char* lpszMsgSendTo); Unicode (Windows) LPWSTR GetMsgSendTo();
INT SetMsgSendTo(LPCWSTR lpszMsgSendTo);
char* secureblackbox_mailwriter_getmsgsendto(void* lpObj);
int secureblackbox_mailwriter_setmsgsendto(void* lpObj, const char* lpszMsgSendTo);
QString GetMsgSendTo();
int SetMsgSendTo(QString qsMsgSendTo);

Default Value

""

Remarks

The value of the To header field.

This field specifies the address(es) of the primary recipient(s) of the message.

This property is not available at design time.

Data Type

String

MsgSubject Property (MailWriter Class)

Contains the subject property of this message.

Syntax

ANSI (Cross Platform)
char* GetMsgSubject();
int SetMsgSubject(const char* lpszMsgSubject); Unicode (Windows) LPWSTR GetMsgSubject();
INT SetMsgSubject(LPCWSTR lpszMsgSubject);
char* secureblackbox_mailwriter_getmsgsubject(void* lpObj);
int secureblackbox_mailwriter_setmsgsubject(void* lpObj, const char* lpszMsgSubject);
QString GetMsgSubject();
int SetMsgSubject(QString qsMsgSubject);

Default Value

""

Remarks

Contains the subject field of this message.

This property is not available at design time.

Data Type

String

HeaderFieldCount Property (MailWriter Class)

The number of records in the HeaderField arrays.

Syntax

ANSI (Cross Platform)
int GetHeaderFieldCount();
int SetHeaderFieldCount(int iHeaderFieldCount); Unicode (Windows) INT GetHeaderFieldCount();
INT SetHeaderFieldCount(INT iHeaderFieldCount);
int secureblackbox_mailwriter_getheaderfieldcount(void* lpObj);
int secureblackbox_mailwriter_setheaderfieldcount(void* lpObj, int iHeaderFieldCount);
int GetHeaderFieldCount();
int SetHeaderFieldCount(int iHeaderFieldCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at HeaderFieldCount - 1.

This property is not available at design time.

Data Type

Integer

HeaderFieldCategory Property (MailWriter Class)

Specifies the string category of the contained value.

Syntax

ANSI (Cross Platform)
char* GetHeaderFieldCategory(int iHeaderFieldIndex);
int SetHeaderFieldCategory(int iHeaderFieldIndex, const char* lpszHeaderFieldCategory); Unicode (Windows) LPWSTR GetHeaderFieldCategory(INT iHeaderFieldIndex);
INT SetHeaderFieldCategory(INT iHeaderFieldIndex, LPCWSTR lpszHeaderFieldCategory);
char* secureblackbox_mailwriter_getheaderfieldcategory(void* lpObj, int headerfieldindex);
int secureblackbox_mailwriter_setheaderfieldcategory(void* lpObj, int headerfieldindex, const char* lpszHeaderFieldCategory);
QString GetHeaderFieldCategory(int iHeaderFieldIndex);
int SetHeaderFieldCategory(int iHeaderFieldIndex, QString qsHeaderFieldCategory);

Default Value

""

Remarks

Specifies the string category of the contained value.

This property allows to check or set the category (or type) associated with the contained value. Depending on the format used to load or save the string, the category parameter may or may not be used.

For example, for ASN.1 property lists the category contains the ASN.1 tag of the contained data (OCTETSTRING, UTF8STRING, INTEGER, ...). For basic (name, value) pairs, such as HTTP headers, the category parameter is not used.

The HeaderFieldIndex parameter specifies the index of the item in the array. The size of the array is controlled by the HeaderFieldCount property.

This property is not available at design time.

Data Type

String

HeaderFieldFormat Property (MailWriter Class)

Specifies the format (encoding) of the value contained in the Value property.

Syntax

ANSI (Cross Platform)
int GetHeaderFieldFormat(int iHeaderFieldIndex);
int SetHeaderFieldFormat(int iHeaderFieldIndex, int iHeaderFieldFormat); Unicode (Windows) INT GetHeaderFieldFormat(INT iHeaderFieldIndex);
INT SetHeaderFieldFormat(INT iHeaderFieldIndex, INT iHeaderFieldFormat);
int secureblackbox_mailwriter_getheaderfieldformat(void* lpObj, int headerfieldindex);
int secureblackbox_mailwriter_setheaderfieldformat(void* lpObj, int headerfieldindex, int iHeaderFieldFormat);
int GetHeaderFieldFormat(int iHeaderFieldIndex);
int SetHeaderFieldFormat(int iHeaderFieldIndex, int iHeaderFieldFormat);

Default Value

0

Remarks

Specifies the format (encoding) of the value contained in the HeaderFieldValue property.

Use this property to check or set the format of the contained value. Remember to provide the actual value in the appropriate format that matches this setting: utils.NameValuePairs[0].Name = "key"; utils.NameValuePairs[0].Format = svfBinary; utils.NameValuePairs[0].Name = "0a1b2c3d4e5f6071";

The following formats are currently supported:

svfText0The property contains text

svfBinary1The property contains binary data. The Value property contains a hex encoding of it.

The HeaderFieldIndex parameter specifies the index of the item in the array. The size of the array is controlled by the HeaderFieldCount property.

This property is not available at design time.

Data Type

Integer

HeaderFieldName Property (MailWriter Class)

The name element in a (name, value) pair.

Syntax

ANSI (Cross Platform)
char* GetHeaderFieldName(int iHeaderFieldIndex);
int SetHeaderFieldName(int iHeaderFieldIndex, const char* lpszHeaderFieldName); Unicode (Windows) LPWSTR GetHeaderFieldName(INT iHeaderFieldIndex);
INT SetHeaderFieldName(INT iHeaderFieldIndex, LPCWSTR lpszHeaderFieldName);
char* secureblackbox_mailwriter_getheaderfieldname(void* lpObj, int headerfieldindex);
int secureblackbox_mailwriter_setheaderfieldname(void* lpObj, int headerfieldindex, const char* lpszHeaderFieldName);
QString GetHeaderFieldName(int iHeaderFieldIndex);
int SetHeaderFieldName(int iHeaderFieldIndex, QString qsHeaderFieldName);

Default Value

""

Remarks

The name element in a (name, value) pair.

The HeaderFieldIndex parameter specifies the index of the item in the array. The size of the array is controlled by the HeaderFieldCount property.

This property is not available at design time.

Data Type

String

HeaderFieldValue Property (MailWriter Class)

The value element in a (name, value) pair.

Syntax

ANSI (Cross Platform)
char* GetHeaderFieldValue(int iHeaderFieldIndex);
int SetHeaderFieldValue(int iHeaderFieldIndex, const char* lpszHeaderFieldValue); Unicode (Windows) LPWSTR GetHeaderFieldValue(INT iHeaderFieldIndex);
INT SetHeaderFieldValue(INT iHeaderFieldIndex, LPCWSTR lpszHeaderFieldValue);
char* secureblackbox_mailwriter_getheaderfieldvalue(void* lpObj, int headerfieldindex);
int secureblackbox_mailwriter_setheaderfieldvalue(void* lpObj, int headerfieldindex, const char* lpszHeaderFieldValue);
QString GetHeaderFieldValue(int iHeaderFieldIndex);
int SetHeaderFieldValue(int iHeaderFieldIndex, QString qsHeaderFieldValue);

Default Value

""

Remarks

The value element in a (name, value) pair.

The HeaderFieldIndex parameter specifies the index of the item in the array. The size of the array is controlled by the HeaderFieldCount property.

This property is not available at design time.

Data Type

String

Profile Property (MailWriter Class)

Specifies a pre-defined profile to apply when creating the signature.

Syntax

ANSI (Cross Platform)
char* GetProfile();
int SetProfile(const char* lpszProfile); Unicode (Windows) LPWSTR GetProfile();
INT SetProfile(LPCWSTR lpszProfile);
char* secureblackbox_mailwriter_getprofile(void* lpObj);
int secureblackbox_mailwriter_setprofile(void* lpObj, const char* lpszProfile);
QString GetProfile();
int SetProfile(QString qsProfile);

Default Value

""

Remarks

Advanced signatures come in many variants, which are often defined by parties that needs to process them or by local standards. SecureBlackbox profiles are sets of pre-defined configurations which correspond to particular signature variants. By specifying a profile, you are pre-configuring the component to make it produce the signature that matches the configuration corresponding to that profile.

Data Type

String

ReplyToAddrCount Property (MailWriter Class)

The number of records in the ReplyToAddr arrays.

Syntax

ANSI (Cross Platform)
int GetReplyToAddrCount();
int SetReplyToAddrCount(int iReplyToAddrCount); Unicode (Windows) INT GetReplyToAddrCount();
INT SetReplyToAddrCount(INT iReplyToAddrCount);
int secureblackbox_mailwriter_getreplytoaddrcount(void* lpObj);
int secureblackbox_mailwriter_setreplytoaddrcount(void* lpObj, int iReplyToAddrCount);
int GetReplyToAddrCount();
int SetReplyToAddrCount(int iReplyToAddrCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at ReplyToAddrCount - 1.

This property is not available at design time.

Data Type

Integer

ReplyToAddrAddress Property (MailWriter Class)

Contains the e-mail address in the form of john@doe.

Syntax

ANSI (Cross Platform)
char* GetReplyToAddrAddress(int iReplyToAddrIndex);
int SetReplyToAddrAddress(int iReplyToAddrIndex, const char* lpszReplyToAddrAddress); Unicode (Windows) LPWSTR GetReplyToAddrAddress(INT iReplyToAddrIndex);
INT SetReplyToAddrAddress(INT iReplyToAddrIndex, LPCWSTR lpszReplyToAddrAddress);
char* secureblackbox_mailwriter_getreplytoaddraddress(void* lpObj, int replytoaddrindex);
int secureblackbox_mailwriter_setreplytoaddraddress(void* lpObj, int replytoaddrindex, const char* lpszReplyToAddrAddress);
QString GetReplyToAddrAddress(int iReplyToAddrIndex);
int SetReplyToAddrAddress(int iReplyToAddrIndex, QString qsReplyToAddrAddress);

Default Value

""

Remarks

Contains the e-mail address in the form of john@doe.com.

The ReplyToAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ReplyToAddrCount property.

This property is not available at design time.

Data Type

String

ReplyToAddrDisplayName Property (MailWriter Class)

Contains the friendly name of the user of this address, such as John Doe.

Syntax

ANSI (Cross Platform)
char* GetReplyToAddrDisplayName(int iReplyToAddrIndex);
int SetReplyToAddrDisplayName(int iReplyToAddrIndex, const char* lpszReplyToAddrDisplayName); Unicode (Windows) LPWSTR GetReplyToAddrDisplayName(INT iReplyToAddrIndex);
INT SetReplyToAddrDisplayName(INT iReplyToAddrIndex, LPCWSTR lpszReplyToAddrDisplayName);
char* secureblackbox_mailwriter_getreplytoaddrdisplayname(void* lpObj, int replytoaddrindex);
int secureblackbox_mailwriter_setreplytoaddrdisplayname(void* lpObj, int replytoaddrindex, const char* lpszReplyToAddrDisplayName);
QString GetReplyToAddrDisplayName(int iReplyToAddrIndex);
int SetReplyToAddrDisplayName(int iReplyToAddrIndex, QString qsReplyToAddrDisplayName);

Default Value

""

Remarks

Contains the friendly name of the user of this address, such as John Doe.

The ReplyToAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ReplyToAddrCount property.

This property is not available at design time.

Data Type

String

ReplyToAddrGroupName Property (MailWriter Class)

The name of the group this address belongs to.

Syntax

ANSI (Cross Platform)
char* GetReplyToAddrGroupName(int iReplyToAddrIndex);
int SetReplyToAddrGroupName(int iReplyToAddrIndex, const char* lpszReplyToAddrGroupName); Unicode (Windows) LPWSTR GetReplyToAddrGroupName(INT iReplyToAddrIndex);
INT SetReplyToAddrGroupName(INT iReplyToAddrIndex, LPCWSTR lpszReplyToAddrGroupName);
char* secureblackbox_mailwriter_getreplytoaddrgroupname(void* lpObj, int replytoaddrindex);
int secureblackbox_mailwriter_setreplytoaddrgroupname(void* lpObj, int replytoaddrindex, const char* lpszReplyToAddrGroupName);
QString GetReplyToAddrGroupName(int iReplyToAddrIndex);
int SetReplyToAddrGroupName(int iReplyToAddrIndex, QString qsReplyToAddrGroupName);

Default Value

""

Remarks

The name of the group this address belongs to.

The ReplyToAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ReplyToAddrCount property.

This property is not available at design time.

Data Type

String

SecSettingsClaimedSigningTime Property (MailWriter Class)

Specifies the signing time from the signer's computer.

Syntax

ANSI (Cross Platform)
char* GetSecSettingsClaimedSigningTime();
int SetSecSettingsClaimedSigningTime(const char* lpszSecSettingsClaimedSigningTime); Unicode (Windows) LPWSTR GetSecSettingsClaimedSigningTime();
INT SetSecSettingsClaimedSigningTime(LPCWSTR lpszSecSettingsClaimedSigningTime);
char* secureblackbox_mailwriter_getsecsettingsclaimedsigningtime(void* lpObj);
int secureblackbox_mailwriter_setsecsettingsclaimedsigningtime(void* lpObj, const char* lpszSecSettingsClaimedSigningTime);
QString GetSecSettingsClaimedSigningTime();
int SetSecSettingsClaimedSigningTime(QString qsSecSettingsClaimedSigningTime);

Default Value

""

Remarks

Specifies the signing time from the signer's computer.

Use this property to specify the signature production time. The claimed time is not covered by the signature, may be forfeited or wrong, and as such is usually taken by verifiers for informational purposes only.

Data Type

String

SecSettingsEncrypt Property (MailWriter Class)

Whether to encrypt the message.

Syntax

ANSI (Cross Platform)
int GetSecSettingsEncrypt();
int SetSecSettingsEncrypt(int bSecSettingsEncrypt); Unicode (Windows) BOOL GetSecSettingsEncrypt();
INT SetSecSettingsEncrypt(BOOL bSecSettingsEncrypt);
int secureblackbox_mailwriter_getsecsettingsencrypt(void* lpObj);
int secureblackbox_mailwriter_setsecsettingsencrypt(void* lpObj, int bSecSettingsEncrypt);
bool GetSecSettingsEncrypt();
int SetSecSettingsEncrypt(bool bSecSettingsEncrypt);

Default Value

FALSE

Remarks

Whether to encrypt the message.

Data Type

Boolean

SecSettingsEncryptionAlgorithm Property (MailWriter Class)

Specifies the encryption algorithm to be used.

Syntax

ANSI (Cross Platform)
char* GetSecSettingsEncryptionAlgorithm();
int SetSecSettingsEncryptionAlgorithm(const char* lpszSecSettingsEncryptionAlgorithm); Unicode (Windows) LPWSTR GetSecSettingsEncryptionAlgorithm();
INT SetSecSettingsEncryptionAlgorithm(LPCWSTR lpszSecSettingsEncryptionAlgorithm);
char* secureblackbox_mailwriter_getsecsettingsencryptionalgorithm(void* lpObj);
int secureblackbox_mailwriter_setsecsettingsencryptionalgorithm(void* lpObj, const char* lpszSecSettingsEncryptionAlgorithm);
QString GetSecSettingsEncryptionAlgorithm();
int SetSecSettingsEncryptionAlgorithm(QString qsSecSettingsEncryptionAlgorithm);

Default Value

"AES128"

Remarks

Specifies the encryption algorithm to be used.

SB_SYMMETRIC_ALGORITHM_RC4RC4
SB_SYMMETRIC_ALGORITHM_DESDES
SB_SYMMETRIC_ALGORITHM_3DES3DES
SB_SYMMETRIC_ALGORITHM_RC2RC2
SB_SYMMETRIC_ALGORITHM_AES128AES128
SB_SYMMETRIC_ALGORITHM_AES192AES192
SB_SYMMETRIC_ALGORITHM_AES256AES256
SB_SYMMETRIC_ALGORITHM_AES128_GCMAES128-GCM
SB_SYMMETRIC_ALGORITHM_AES192_GCMAES192-GCM
SB_SYMMETRIC_ALGORITHM_AES256_GCMAES256-GCM

Data Type

String

SecSettingsHashAlgorithm Property (MailWriter Class)

Specifies the hash algorithm to be used.

Syntax

ANSI (Cross Platform)
char* GetSecSettingsHashAlgorithm();
int SetSecSettingsHashAlgorithm(const char* lpszSecSettingsHashAlgorithm); Unicode (Windows) LPWSTR GetSecSettingsHashAlgorithm();
INT SetSecSettingsHashAlgorithm(LPCWSTR lpszSecSettingsHashAlgorithm);
char* secureblackbox_mailwriter_getsecsettingshashalgorithm(void* lpObj);
int secureblackbox_mailwriter_setsecsettingshashalgorithm(void* lpObj, const char* lpszSecSettingsHashAlgorithm);
QString GetSecSettingsHashAlgorithm();
int SetSecSettingsHashAlgorithm(QString qsSecSettingsHashAlgorithm);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm to be used.

SB_HASH_ALGORITHM_MD5MD5
SB_HASH_ALGORITHM_SHA1SHA1
SB_HASH_ALGORITHM_SHA256SHA256
SB_HASH_ALGORITHM_SHA384SHA384
SB_HASH_ALGORITHM_SHA512SHA512
SB_HASH_ALGORITHM_SHA3_256SHA3_256
SB_HASH_ALGORITHM_SHA3_384SHA3_384
SB_HASH_ALGORITHM_SHA3_512SHA3_512
SB_HASH_ALGORITHM_BLAKE2S_128BLAKE2S_128
SB_HASH_ALGORITHM_BLAKE2S_160BLAKE2S_160
SB_HASH_ALGORITHM_BLAKE2S_224BLAKE2S_224
SB_HASH_ALGORITHM_BLAKE2S_256BLAKE2S_256
SB_HASH_ALGORITHM_BLAKE2B_160BLAKE2B_160
SB_HASH_ALGORITHM_BLAKE2B_256BLAKE2B_256
SB_HASH_ALGORITHM_BLAKE2B_384BLAKE2B_384
SB_HASH_ALGORITHM_BLAKE2B_512BLAKE2B_512

Data Type

String

SecSettingsSign Property (MailWriter Class)

Whether to sign the message.

Syntax

ANSI (Cross Platform)
int GetSecSettingsSign();
int SetSecSettingsSign(int bSecSettingsSign); Unicode (Windows) BOOL GetSecSettingsSign();
INT SetSecSettingsSign(BOOL bSecSettingsSign);
int secureblackbox_mailwriter_getsecsettingssign(void* lpObj);
int secureblackbox_mailwriter_setsecsettingssign(void* lpObj, int bSecSettingsSign);
bool GetSecSettingsSign();
int SetSecSettingsSign(bool bSecSettingsSign);

Default Value

FALSE

Remarks

Whether to sign the message.

Data Type

Boolean

SecSettingsSignatureFormat Property (MailWriter Class)

Specifies the signature format to use for the signed message.

Syntax

ANSI (Cross Platform)
int GetSecSettingsSignatureFormat();
int SetSecSettingsSignatureFormat(int iSecSettingsSignatureFormat); Unicode (Windows) INT GetSecSettingsSignatureFormat();
INT SetSecSettingsSignatureFormat(INT iSecSettingsSignatureFormat);

Possible Values

MS_MULTIPART_SIGNED(0), 
MS_SIGNED_DATA(1)
int secureblackbox_mailwriter_getsecsettingssignatureformat(void* lpObj);
int secureblackbox_mailwriter_setsecsettingssignatureformat(void* lpObj, int iSecSettingsSignatureFormat);
int GetSecSettingsSignatureFormat();
int SetSecSettingsSignatureFormat(int iSecSettingsSignatureFormat);

Default Value

0

Remarks

Specifies the signature format to use for the signed message.

Available options:

msMultipartSigned0
msSignedData1

Data Type

Integer

SecSettingsSignBeforeEncrypt Property (MailWriter Class)

Specifies the order of encryption and signing operations.

Syntax

ANSI (Cross Platform)
int GetSecSettingsSignBeforeEncrypt();
int SetSecSettingsSignBeforeEncrypt(int bSecSettingsSignBeforeEncrypt); Unicode (Windows) BOOL GetSecSettingsSignBeforeEncrypt();
INT SetSecSettingsSignBeforeEncrypt(BOOL bSecSettingsSignBeforeEncrypt);
int secureblackbox_mailwriter_getsecsettingssignbeforeencrypt(void* lpObj);
int secureblackbox_mailwriter_setsecsettingssignbeforeencrypt(void* lpObj, int bSecSettingsSignBeforeEncrypt);
bool GetSecSettingsSignBeforeEncrypt();
int SetSecSettingsSignBeforeEncrypt(bool bSecSettingsSignBeforeEncrypt);

Default Value

TRUE

Remarks

Specifies the order of encryption and signing operations.

Data Type

Boolean

SecSettingsSignMessageHeader Property (MailWriter Class)

Specifies whether to include the message header in the signature calculation.

Syntax

ANSI (Cross Platform)
int GetSecSettingsSignMessageHeader();
int SetSecSettingsSignMessageHeader(int bSecSettingsSignMessageHeader); Unicode (Windows) BOOL GetSecSettingsSignMessageHeader();
INT SetSecSettingsSignMessageHeader(BOOL bSecSettingsSignMessageHeader);
int secureblackbox_mailwriter_getsecsettingssignmessageheader(void* lpObj);
int secureblackbox_mailwriter_setsecsettingssignmessageheader(void* lpObj, int bSecSettingsSignMessageHeader);
bool GetSecSettingsSignMessageHeader();
int SetSecSettingsSignMessageHeader(bool bSecSettingsSignMessageHeader);

Default Value

FALSE

Remarks

Specifies whether to include the message header in the signature calculation.

Data Type

Boolean

SenderAddrAddress Property (MailWriter Class)

Contains the e-mail address in the form of john@doe.

Syntax

ANSI (Cross Platform)
char* GetSenderAddrAddress();
int SetSenderAddrAddress(const char* lpszSenderAddrAddress); Unicode (Windows) LPWSTR GetSenderAddrAddress();
INT SetSenderAddrAddress(LPCWSTR lpszSenderAddrAddress);
char* secureblackbox_mailwriter_getsenderaddraddress(void* lpObj);
int secureblackbox_mailwriter_setsenderaddraddress(void* lpObj, const char* lpszSenderAddrAddress);
QString GetSenderAddrAddress();
int SetSenderAddrAddress(QString qsSenderAddrAddress);

Default Value

""

Remarks

Contains the e-mail address in the form of john@doe.com.

This property is not available at design time.

Data Type

String

SenderAddrDisplayName Property (MailWriter Class)

Contains the friendly name of the user of this address, such as John Doe.

Syntax

ANSI (Cross Platform)
char* GetSenderAddrDisplayName();
int SetSenderAddrDisplayName(const char* lpszSenderAddrDisplayName); Unicode (Windows) LPWSTR GetSenderAddrDisplayName();
INT SetSenderAddrDisplayName(LPCWSTR lpszSenderAddrDisplayName);
char* secureblackbox_mailwriter_getsenderaddrdisplayname(void* lpObj);
int secureblackbox_mailwriter_setsenderaddrdisplayname(void* lpObj, const char* lpszSenderAddrDisplayName);
QString GetSenderAddrDisplayName();
int SetSenderAddrDisplayName(QString qsSenderAddrDisplayName);

Default Value

""

Remarks

Contains the friendly name of the user of this address, such as John Doe.

This property is not available at design time.

Data Type

String

SenderAddrGroupName Property (MailWriter Class)

The name of the group this address belongs to.

Syntax

ANSI (Cross Platform)
char* GetSenderAddrGroupName();
int SetSenderAddrGroupName(const char* lpszSenderAddrGroupName); Unicode (Windows) LPWSTR GetSenderAddrGroupName();
INT SetSenderAddrGroupName(LPCWSTR lpszSenderAddrGroupName);
char* secureblackbox_mailwriter_getsenderaddrgroupname(void* lpObj);
int secureblackbox_mailwriter_setsenderaddrgroupname(void* lpObj, const char* lpszSenderAddrGroupName);
QString GetSenderAddrGroupName();
int SetSenderAddrGroupName(QString qsSenderAddrGroupName);

Default Value

""

Remarks

The name of the group this address belongs to.

This property is not available at design time.

Data Type

String

SendToAddrCount Property (MailWriter Class)

The number of records in the SendToAddr arrays.

Syntax

ANSI (Cross Platform)
int GetSendToAddrCount();
int SetSendToAddrCount(int iSendToAddrCount); Unicode (Windows) INT GetSendToAddrCount();
INT SetSendToAddrCount(INT iSendToAddrCount);
int secureblackbox_mailwriter_getsendtoaddrcount(void* lpObj);
int secureblackbox_mailwriter_setsendtoaddrcount(void* lpObj, int iSendToAddrCount);
int GetSendToAddrCount();
int SetSendToAddrCount(int iSendToAddrCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at SendToAddrCount - 1.

This property is not available at design time.

Data Type

Integer

SendToAddrAddress Property (MailWriter Class)

Contains the e-mail address in the form of john@doe.

Syntax

ANSI (Cross Platform)
char* GetSendToAddrAddress(int iSendToAddrIndex);
int SetSendToAddrAddress(int iSendToAddrIndex, const char* lpszSendToAddrAddress); Unicode (Windows) LPWSTR GetSendToAddrAddress(INT iSendToAddrIndex);
INT SetSendToAddrAddress(INT iSendToAddrIndex, LPCWSTR lpszSendToAddrAddress);
char* secureblackbox_mailwriter_getsendtoaddraddress(void* lpObj, int sendtoaddrindex);
int secureblackbox_mailwriter_setsendtoaddraddress(void* lpObj, int sendtoaddrindex, const char* lpszSendToAddrAddress);
QString GetSendToAddrAddress(int iSendToAddrIndex);
int SetSendToAddrAddress(int iSendToAddrIndex, QString qsSendToAddrAddress);

Default Value

""

Remarks

Contains the e-mail address in the form of john@doe.com.

The SendToAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SendToAddrCount property.

This property is not available at design time.

Data Type

String

SendToAddrDisplayName Property (MailWriter Class)

Contains the friendly name of the user of this address, such as John Doe.

Syntax

ANSI (Cross Platform)
char* GetSendToAddrDisplayName(int iSendToAddrIndex);
int SetSendToAddrDisplayName(int iSendToAddrIndex, const char* lpszSendToAddrDisplayName); Unicode (Windows) LPWSTR GetSendToAddrDisplayName(INT iSendToAddrIndex);
INT SetSendToAddrDisplayName(INT iSendToAddrIndex, LPCWSTR lpszSendToAddrDisplayName);
char* secureblackbox_mailwriter_getsendtoaddrdisplayname(void* lpObj, int sendtoaddrindex);
int secureblackbox_mailwriter_setsendtoaddrdisplayname(void* lpObj, int sendtoaddrindex, const char* lpszSendToAddrDisplayName);
QString GetSendToAddrDisplayName(int iSendToAddrIndex);
int SetSendToAddrDisplayName(int iSendToAddrIndex, QString qsSendToAddrDisplayName);

Default Value

""

Remarks

Contains the friendly name of the user of this address, such as John Doe.

The SendToAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SendToAddrCount property.

This property is not available at design time.

Data Type

String

SendToAddrGroupName Property (MailWriter Class)

The name of the group this address belongs to.

Syntax

ANSI (Cross Platform)
char* GetSendToAddrGroupName(int iSendToAddrIndex);
int SetSendToAddrGroupName(int iSendToAddrIndex, const char* lpszSendToAddrGroupName); Unicode (Windows) LPWSTR GetSendToAddrGroupName(INT iSendToAddrIndex);
INT SetSendToAddrGroupName(INT iSendToAddrIndex, LPCWSTR lpszSendToAddrGroupName);
char* secureblackbox_mailwriter_getsendtoaddrgroupname(void* lpObj, int sendtoaddrindex);
int secureblackbox_mailwriter_setsendtoaddrgroupname(void* lpObj, int sendtoaddrindex, const char* lpszSendToAddrGroupName);
QString GetSendToAddrGroupName(int iSendToAddrIndex);
int SetSendToAddrGroupName(int iSendToAddrIndex, QString qsSendToAddrGroupName);

Default Value

""

Remarks

The name of the group this address belongs to.

The SendToAddrIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SendToAddrCount property.

This property is not available at design time.

Data Type

String

SigningCertBytes Property (MailWriter Class)

Returns raw certificate data in DER format.

Syntax

ANSI (Cross Platform)
int GetSigningCertBytes(char* &lpSigningCertBytes, int &lenSigningCertBytes);

Unicode (Windows)
INT GetSigningCertBytes(LPSTR &lpSigningCertBytes, INT &lenSigningCertBytes);
int secureblackbox_mailwriter_getsigningcertbytes(void* lpObj, char** lpSigningCertBytes, int* lenSigningCertBytes);
QByteArray GetSigningCertBytes();

Remarks

Returns raw certificate data in DER format.

This property is read-only and not available at design time.

Data Type

Byte Array

SigningCertHandle Property (MailWriter Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetSigningCertHandle();
int SetSigningCertHandle(int64 lSigningCertHandle); Unicode (Windows) LONG64 GetSigningCertHandle();
INT SetSigningCertHandle(LONG64 lSigningCertHandle);
int64 secureblackbox_mailwriter_getsigningcerthandle(void* lpObj);
int secureblackbox_mailwriter_setsigningcerthandle(void* lpObj, int64 lSigningCertHandle);
qint64 GetSigningCertHandle();
int SetSigningCertHandle(qint64 lSigningCertHandle);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

This property is not available at design time.

Data Type

Long64

SigningChainCount Property (MailWriter Class)

The number of records in the SigningChain arrays.

Syntax

ANSI (Cross Platform)
int GetSigningChainCount();
int SetSigningChainCount(int iSigningChainCount); Unicode (Windows) INT GetSigningChainCount();
INT SetSigningChainCount(INT iSigningChainCount);
int secureblackbox_mailwriter_getsigningchaincount(void* lpObj);
int secureblackbox_mailwriter_setsigningchaincount(void* lpObj, int iSigningChainCount);
int GetSigningChainCount();
int SetSigningChainCount(int iSigningChainCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at SigningChainCount - 1.

This property is not available at design time.

Data Type

Integer

SigningChainBytes Property (MailWriter Class)

Returns raw certificate data in DER format.

Syntax

ANSI (Cross Platform)
int GetSigningChainBytes(int iSigningChainIndex, char* &lpSigningChainBytes, int &lenSigningChainBytes);

Unicode (Windows)
INT GetSigningChainBytes(INT iSigningChainIndex, LPSTR &lpSigningChainBytes, INT &lenSigningChainBytes);
int secureblackbox_mailwriter_getsigningchainbytes(void* lpObj, int signingchainindex, char** lpSigningChainBytes, int* lenSigningChainBytes);
QByteArray GetSigningChainBytes(int iSigningChainIndex);

Remarks

Returns raw certificate data in DER format.

The SigningChainIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SigningChainCount property.

This property is read-only and not available at design time.

Data Type

Byte Array

SigningChainHandle Property (MailWriter Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetSigningChainHandle(int iSigningChainIndex);
int SetSigningChainHandle(int iSigningChainIndex, int64 lSigningChainHandle); Unicode (Windows) LONG64 GetSigningChainHandle(INT iSigningChainIndex);
INT SetSigningChainHandle(INT iSigningChainIndex, LONG64 lSigningChainHandle);
int64 secureblackbox_mailwriter_getsigningchainhandle(void* lpObj, int signingchainindex);
int secureblackbox_mailwriter_setsigningchainhandle(void* lpObj, int signingchainindex, int64 lSigningChainHandle);
qint64 GetSigningChainHandle(int iSigningChainIndex);
int SetSigningChainHandle(int iSigningChainIndex, qint64 lSigningChainHandle);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

The SigningChainIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SigningChainCount property.

This property is not available at design time.

Data Type

Long64

TextEncoding Property (MailWriter Class)

The encoding to be applied to the message.

Syntax

ANSI (Cross Platform)
int GetTextEncoding();
int SetTextEncoding(int iTextEncoding); Unicode (Windows) INT GetTextEncoding();
INT SetTextEncoding(INT iTextEncoding);

Possible Values

ME_AUTO(0), 
ME_8BIT(1),
ME_BASE_64(2),
ME_QUOTED_PRINTABLE(3)
int secureblackbox_mailwriter_gettextencoding(void* lpObj);
int secureblackbox_mailwriter_settextencoding(void* lpObj, int iTextEncoding);
int GetTextEncoding();
int SetTextEncoding(int iTextEncoding);

Default Value

0

Remarks

Use this property to specify the encoding to use for the content of the message.

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Data Type

Integer

AttachBytes Method (MailWriter Class)

Creates an attachment from a memory buffer.

Syntax

ANSI (Cross Platform)
int AttachBytes(const char* lpData, int lenData);

Unicode (Windows)
INT AttachBytes(LPCSTR lpData, INT lenData);
int secureblackbox_mailwriter_attachbytes(void* lpObj, const char* lpData, int lenData);
int AttachBytes(QByteArray qbaData);

Remarks

Use this method to create an attachment from a memory buffer. Use Attachments property to provide further attachment details.

The method returns the index of the new attachment in the Attachments list.

Error Handling (C++)

This method returns an Integer value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

AttachFile Method (MailWriter Class)

Creates an attachment from a file.

Syntax

ANSI (Cross Platform)
int AttachFile(const char* lpszFilename);

Unicode (Windows)
INT AttachFile(LPCWSTR lpszFilename);
int secureblackbox_mailwriter_attachfile(void* lpObj, const char* lpszFilename);
int AttachFile(const QString& qsFilename);

Remarks

Use this method to create an attachment from a file. Use Attachments property to provide further attachment details.

The method returns the index of the new attachment in the Attachments list.

Error Handling (C++)

This method returns an Integer value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

AttachImage Method (MailWriter Class)

Creates an image attachment from a memory buffer.

Syntax

ANSI (Cross Platform)
int AttachImage(const char* lpszID, const char* lpData, int lenData);

Unicode (Windows)
INT AttachImage(LPCWSTR lpszID, LPCSTR lpData, INT lenData);
int secureblackbox_mailwriter_attachimage(void* lpObj, const char* lpszID, const char* lpData, int lenData);
int AttachImage(const QString& qsID, QByteArray qbaData);

Remarks

Use this method to create a picture attachment from a memory buffer. Use Attachments property to provide further attachment details.

The method returns the index of the new attachment in the Attachments list.

Error Handling (C++)

This method returns an Integer value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Config Method (MailWriter Class)

Sets or retrieves a configuration setting.

Syntax

ANSI (Cross Platform)
char* Config(const char* lpszConfigurationString);

Unicode (Windows)
LPWSTR Config(LPCWSTR lpszConfigurationString);
char* secureblackbox_mailwriter_config(void* lpObj, const char* lpszConfigurationString);
QString Config(const QString& qsConfigurationString);

Remarks

Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

DoAction Method (MailWriter Class)

Performs an additional action.

Syntax

ANSI (Cross Platform)
char* DoAction(const char* lpszActionID, const char* lpszActionParams);

Unicode (Windows)
LPWSTR DoAction(LPCWSTR lpszActionID, LPCWSTR lpszActionParams);
char* secureblackbox_mailwriter_doaction(void* lpObj, const char* lpszActionID, const char* lpszActionParams);
QString DoAction(const QString& qsActionID, const QString& qsActionParams);

Remarks

DoAction is a generic method available in every class. It is used to perform an additional action introduced after the product major release. The list of actions is not fixed, and may be flexibly extended over time.

The unique identifier (case insencitive) of the action is provided in the ActionID parameter.

ActionParams contains the value of a single parameter, or a list of multiple parameters for the action in the form of PARAM1=VALUE1;PARAM2=VALUE2;....

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

SaveToBytes Method (MailWriter Class)

Serializes the message to a byte array.

Syntax

ANSI (Cross Platform)
char* SaveToBytes(int *lpSize = NULL);

Unicode (Windows)
LPSTR SaveToBytes(LPINT lpSize = NULL);
char* secureblackbox_mailwriter_savetobytes(void* lpObjint *lpSize);
QByteArray SaveToBytes();

Remarks

Use this method to assemble the message and save it to a byte array.

Error Handling (C++)

This method returns a Byte Array value (with length lpSize); after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

SaveToFile Method (MailWriter Class)

Serializes the message to a file.

Syntax

ANSI (Cross Platform)
int SaveToFile(const char* lpszFilename);

Unicode (Windows)
INT SaveToFile(LPCWSTR lpszFilename);
int secureblackbox_mailwriter_savetofile(void* lpObj, const char* lpszFilename);
int SaveToFile(const QString& qsFilename);

Remarks

Use this method to assemble the message and save it to a file.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SaveToStream Method (MailWriter Class)

Serializes the message to a stream.

Syntax

ANSI (Cross Platform)
int SaveToStream(SecureBlackboxStream* sStream);

Unicode (Windows)
INT SaveToStream(SecureBlackboxStream* sStream);
int secureblackbox_mailwriter_savetostream(void* lpObj, SecureBlackboxStream* sStream);
int SaveToStream(SecureBlackboxStream* sStream);

Remarks

Use this method to assemble the message and save it to a stream.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Error Event (MailWriter Class)

Reports information about errors during e-mail message assembling or saving.

Syntax

ANSI (Cross Platform)
virtual int FireError(MailWriterErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description; int reserved; } MailWriterErrorEventParams;
Unicode (Windows) virtual INT FireError(MailWriterErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description; INT reserved; } MailWriterErrorEventParams;
#define EID_MAILWRITER_ERROR 1

virtual INT SECUREBLACKBOX_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription);
class MailWriterErrorEventParams {
public:
  int ErrorCode();

  const QString &Description();

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Error(MailWriterErrorEventParams *e);
// Or, subclass MailWriter and override this emitter function. virtual int FireError(MailWriterErrorEventParams *e) {...}

Remarks

The event is fired in case of exceptional conditions during message processing.

ErrorCode contains an error code and Description contains a textual description of the error.

ExternalSign Event (MailWriter Class)

Handles remote or external signing initiated by the SignExternal method or other source.

Syntax

ANSI (Cross Platform)
virtual int FireExternalSign(MailWriterExternalSignEventParams *e);
typedef struct {
const char *OperationId;
const char *HashAlgorithm;
const char *Pars;
const char *Data;
char *SignedData; int reserved; } MailWriterExternalSignEventParams;
Unicode (Windows) virtual INT FireExternalSign(MailWriterExternalSignEventParams *e);
typedef struct {
LPCWSTR OperationId;
LPCWSTR HashAlgorithm;
LPCWSTR Pars;
LPCWSTR Data;
LPWSTR SignedData; INT reserved; } MailWriterExternalSignEventParams;
#define EID_MAILWRITER_EXTERNALSIGN 2

virtual INT SECUREBLACKBOX_CALL FireExternalSign(LPSTR &lpszOperationId, LPSTR &lpszHashAlgorithm, LPSTR &lpszPars, LPSTR &lpszData, LPSTR &lpszSignedData);
class MailWriterExternalSignEventParams {
public:
  const QString &OperationId();

  const QString &HashAlgorithm();

  const QString &Pars();

  const QString &Data();

  const QString &SignedData();
  void SetSignedData(const QString &qsSignedData);

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void ExternalSign(MailWriterExternalSignEventParams *e);
// Or, subclass MailWriter and override this emitter function. virtual int FireExternalSign(MailWriterExternalSignEventParams *e) {...}

Remarks

Assign a handler to this event if you need to delegate a low-level signing operation to an external, remote, or custom signing engine. Depending on the settings, the handler will receive a hashed or unhashed value to be signed.

The event handler must pass the value of Data to the signer, obtain the signature, and pass it back to the component via SignedData parameter.

OperationId provides a comment about the operation and its origin. It depends on the exact component being used, and may be empty. HashAlgorithm specifies the hash algorithm being used for the operation, and Pars contain algorithm-dependent parameters.

The component uses base16 (hex) encoding for Data, SignedData, and Pars parameters. If your signing engine uses a different input and output encoding, you may need to decode and/or encode the data before and/or after the signing.

A sample MD5 hash encoded in base16: a0dee2a0382afbb09120ffa7ccd8a152 - lower case base16 A0DEE2A0382AFBB09120FFA7CCD8A152 - upper case base16

A sample event handler that uses a .NET RSACryptoServiceProvider class may look like the following: signer.OnExternalSign += (s, e) => { var cert = new X509Certificate2("cert.pfx", "", X509KeyStorageFlags.Exportable); var key = (RSACryptoServiceProvider)cert.PrivateKey; var dataToSign = e.Data.FromBase16String(); var signedData = key.SignHash(dataToSign, "2.16.840.1.101.3.4.2.1"); e.SignedData = signedData.ToBase16String(); };

Notification Event (MailWriter Class)

This event notifies the application about an underlying control flow event.

Syntax

ANSI (Cross Platform)
virtual int FireNotification(MailWriterNotificationEventParams *e);
typedef struct {
const char *EventID;
const char *EventParam; int reserved; } MailWriterNotificationEventParams;
Unicode (Windows) virtual INT FireNotification(MailWriterNotificationEventParams *e);
typedef struct {
LPCWSTR EventID;
LPCWSTR EventParam; INT reserved; } MailWriterNotificationEventParams;
#define EID_MAILWRITER_NOTIFICATION 3

virtual INT SECUREBLACKBOX_CALL FireNotification(LPSTR &lpszEventID, LPSTR &lpszEventParam);
class MailWriterNotificationEventParams {
public:
  const QString &EventID();

  const QString &EventParam();

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Notification(MailWriterNotificationEventParams *e);
// Or, subclass MailWriter and override this emitter function. virtual int FireNotification(MailWriterNotificationEventParams *e) {...}

Remarks

The class fires this event to let the application know about some event, occurrence, or milestone in the component. For example, it may fire to report completion of the document processing. The list of events being reported is not fixed, and may be flexibly extended over time.

The unique identifier of the event is provided in EventID parameter. EventParam contains any parameters accompanying the occurrence. Depending on the type of the component, the exact action it is performing, or the document being processed, one or both may be omitted.

SecureBlackboxStream Type

Syntax

SecureBlackboxStream (declared in secureblackbox.h)

Remarks

The MailWriter class includes one or more API members that take a stream object as a parameter. To use such API members, create a concrete class that implements the SecureBlackboxStream interface and pass the MailWriter class an instance of that concrete class.

When implementing the SecureBlackboxStream interface's properties and methods, they must behave as described below. If the concrete class's implementation does not behave as expected, undefined behavior may occur.

Properties

CanRead Whether the stream supports reading.

bool CanRead() { return true; }
CanSeek Whether the stream supports seeking.

bool CanSeek() { return true; }
CanWrite Whether the stream supports writing.

bool CanWrite() { return true; }
Length Gets the length of the stream, in bytes.

int64 GetLength() = 0;

Methods

Close Closes the stream, releasing all resources currently allocated for it.

void Close() {}

This method is called automatically when a SecureBlackboxStream object is deleted.

Flush Forces all data held by the stream's buffers to be written out to storage.

int Flush() { return 0; }

Must return 0 if flushing is successful; or -1 if an error occurs or the stream is closed. If the stream does not support writing, this method must do nothing and return 0.

Read Reads a sequence of bytes from the stream and advances the current position within the stream by the number of bytes read.

int Read(void* buffer, int count) = 0;

Buffer specifies the buffer to populate with data from the stream. Count specifies the number of bytes that should be read from the stream.

Must return the total number of bytes read into Buffer; this may be less than Count if that many bytes are not currently available, or 0 if the end of the stream has been reached. Must return -1 if an error occurs, if reading is not supported, or if the stream is closed.

Seek Sets the current position within the stream based on a particular point of origin.

int64 Seek(int64 offset, int seekOrigin) = 0;

Offset specifies the offset in the stream to seek to, relative to SeekOrigin. Valid values for SeekOrigin are:

  • 0: Seek from beginning.
  • 1: Seek from current position.
  • 2: Seek from end.

Must return the new position within the stream; or -1 if an error occurs, if seeking is not supported, or if the stream is closed (however, see note below). If -1 is returned, the current position within the stream must remain unchanged.

Note: If the stream is not closed, it must always be possible to call this method with an Offset of 0 and a SeekOrigin of 1 to obtain the current position within the stream, even if seeking is not otherwise supported.

Write Writes a sequence of bytes to the stream and advances the current position within the stream by the number of bytes written.

int Write(const void* buffer, int count) = 0;

Buffer specifies the buffer with data to write to the stream. Count specifies the number of bytes that should be written to the stream.

Must return the total number of bytes written to the stream; this may be less than Count if that many bytes could not be written. Must return -1 if an error occurs, if writing is not supported, or if the stream is closed.

Config Settings (MailWriter Class)

The class 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 class, access to these internal properties is provided through the Config method.

MailWriter Config Settings

BitsInKey:   Key length for the block cipher used for encryption. The value should be a multiple of 8.

IncludeSigningCertificate:   If true (by default), the signing certificate is included into the signature. Otherwise, it is included only if SigningChain is not empty.

TempPath:   Path for storing temporary files.

This setting specifies an absolute path to the location on disk where temporary files are stored.

Base Config Settings

CheckKeyIntegrityBeforeUse:   Enables or disable private key integrity check before use.

This global property enables or disables private key material check before each signing operation. This slows down performance a bit, but prevents a selection of attacks on RSA keys where keys with unknown origins are used.

You can switch this property off to improve performance if your project only uses known, good private keys.

CookieCaching:   Specifies whether a cookie cache should be used for HTTP(S) transports.

Set this property to enable or disable cookies caching for the class.

Supported values are:

offNo caching (default)
localLocal caching
globalGlobal caching

Cookies:   Gets or sets local cookies for the class.

Use this property to get cookies from the internal cookie storage of the class and/or restore them back between application sessions.

DefDeriveKeyIterations:   Specifies the default key derivation algorithm iteration count.

This global property sets the default number of iterations for all supported key derivation algorithms. Note that you can provide the required number of iterations by using properties of the relevant key generation component; this global setting is used in scenarios where specific iteration count is not or cannot be provided.

EnableClientSideSSLFFDHE:   Enables or disables finite field DHE key exchange support in TLS clients.

This global property enables or disables support for finite field DHE key exchange methods in TLS clients. FF DHE is a slower algorithm if compared to EC DHE; enabling it may result in slower connections.

This setting only applies to sessions negotiated with TLS version 1.3.

GlobalCookies:   Gets or sets global cookies for all the HTTP transports.

Use this property to get cookies from the GLOBAL cookie storage or restore them back between application sessions. These cookies will be used by all the classes that have its CookieCaching property set to "global".

HttpUserAgent:   Specifies the user agent name to be used by all HTTP clients.

This global setting defines the User-Agent field of the HTTP request provides information about the software that initiates the request. This value will be used by all the HTTP clients including the ones used internally in other classes.

LogDestination:   Specifies the debug log destination.

Contains a comma-separated list of values that specifies where debug log should be dumped.

Supported values are:

fileFile
consoleConsole
systemlogSystem Log (supported for Android only)
debuggerDebugger (supported for VCL for Windows and .Net)

LogDetails:   Specifies the debug log details to dump.

Contains a comma-separated list of values that specifies which debug log details to dump.

Supported values are:

timeCurrent time
levelLevel
packagePackage name
moduleModule name
classClass name
methodMethod name
threadidThread Id
contenttypeContent type
contentContent
allAll details

LogFile:   Specifies the debug log filename.

Use this property to provide a path to the log file.

LogFilters:   Specifies the debug log filters.

Contains a comma-separated list of value pairs ("name:value") that describe filters.

Supported filter names are:

exclude-packageExclude a package specified in the value
exclude-moduleExclude a module specified in the value
exclude-classExclude a class specified in the value
exclude-methodExclude a method specified in the value
include-packageInclude a package specified in the value
include-moduleInclude a module specified in the value
include-classInclude a class specified in the value
include-methodInclude a method specified in the value

LogFlushMode:   Specifies the log flush mode.

Use this property to set the log flush mode. The following values are defined:

noneNo flush (caching only)
immediateImmediate flush (real-time logging)
maxcountFlush cached entries upon reaching LogMaxEventCount entries in the cache.

LogLevel:   Specifies the debug log level.

Use this property to provide the desired debug log level.

Supported values are:

noneNone (by default)
fatalSevere errors that cause premature termination.
errorOther runtime errors or unexpected conditions.
warningUse of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong".
infoInteresting runtime events (startup/shutdown).
debugDetailed information on flow of through the system.
traceMore detailed information.

LogMaxEventCount:   Specifies the maximum number of events to cache before further action is taken.

Use this property to specify the log event number threshold. This threshold may have different effects, depending on the rotation setting and/or the flush mode.

The default value of this setting is 100.

LogRotationMode:   Specifies the log rotation mode.

Use this property to set the log rotation mode. The following values are defined:

noneNo rotation
deleteolderDelete older entries from the cache upon reaching LogMaxEventCount
keepolderKeep older entries in the cache upon reaching LogMaxEventCount (newer entries are discarded)

MaxASN1BufferLength:   Specifies the maximal allowed length for ASN.1 primitive tag data.

This global property limits the maximal allowed length for ASN.1 tag data for non-content-carrying structures, such as certificates, CRLs, or timestamps. It does not affect structures that can carry content, such as CMS/CAdES messages. This is a security property aiming at preventing DoS attacks.

MaxASN1TreeDepth:   Specifies the maximal depth for processed ASN.1 trees.

This global property limits the maximal depth of ASN.1 trees that the component can handle without throwing an error. This is a security property aiming at preventing DoS attacks.

OCSPHashAlgorithm:   Specifies the hash algorithm to be used to identify certificates in OCSP requests.

This global setting defines the hash algorithm to use in OCSP requests during chain validation. Some OCSP responders can only use older algorithms, in which case setting this property to SHA1 may be helpful.

StaticDNS:   Specifies whether static DNS rules should be used.

Set this property to enable or disable static DNS rules for the class. Works only if UseOwnDNSResolver is set to true.

Supported values are:

noneNo static DNS rules (default)
localLocal static DNS rules
globalGlobal static DNS rules

StaticIPAddress[domain]:   Gets or sets an IP address for the specified domain name.

Use this property to get or set an IP address for the specified domain name in the internal (of the class) or global DNS rules storage depending on the StaticDNS value. The type of the IP address (IPv4 or IPv6) is determined automatically. If both addresses are available, they are devided by the | (pipe) character.

StaticIPAddresses:   Gets or sets all the static DNS rules.

Use this property to get static DNS rules from the current rules storage or restore them back between application sessions. If StaticDNS of the class is set to "local", the property returns/restores the rules from/to the internal storage of the class. If StaticDNS of the class is set to "global", the property returns/restores the rules from/to the GLOBAL storage. The rules list is returned and accepted in JSON format.

Tag:   Allows to store any custom data.

Use this config property to store any custom data.

TLSSessionGroup:   Specifies the group name of TLS sessions to be used for session resumption.

Use this property to limit the search of chached TLS sessions to the specified group. Sessions from other groups will be ignored. By default, all sessions are cached with an empty group name and available to all the classes.

TLSSessionLifetime:   Specifies lifetime in seconds of the cached TLS session.

Use this property to specify how much time the TLS session should be kept in the session cache. After this time, the session expires and will be automatically removed from the cache. Default value is 300 seconds (5 minutes).

TLSSessionPurgeInterval:   Specifies how often the session cache should remove the expired TLS sessions.

Use this property to specify the time interval of purging the expired TLS sessions from the session cache. Default value is 60 seconds (1 minute).

UseOwnDNSResolver:   Specifies whether the client components should use own DNS resolver.

Set this global property to false to force all the client components to use the DNS resolver provided by the target OS instead of using own one.

UseSharedSystemStorages:   Specifies whether the validation engine should use a global per-process copy of the system certificate stores.

Set this global property to false to make each validation run use its own copy of system certificate stores.

UseSystemOAEPAndPSS:   Enforces or disables the use of system-driven RSA OAEP and PSS computations.

This global setting defines who is responsible for performing RSA-OAEP and RSA-PSS computations where the private key is stored in a Windows system store and is exportable. If set to true, SBB will delegate the computations to Windows via a CryptoAPI call. Otherwise, it will export the key material and perform the computations using its own OAEP/PSS implementation.

This setting only applies to certificates originating from a Windows system store.

UseSystemRandom:   Enables or disables the use of the OS PRNG.

Use this global property to enable or disable the use of operating system-driven pseudorandom number generation.

Trappable Errors (MailWriter Class)

Error Handling (C++)

Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

MailWriter Errors

1048577   Invalid parameter value (SB_ERROR_INVALID_PARAMETER)
1048578   Class is configured incorrectly (SB_ERROR_INVALID_SETUP)
1048579   Operation cannot be executed in the current state (SB_ERROR_INVALID_STATE)
1048580   Attempt to set an invalid value to a property (SB_ERROR_INVALID_VALUE)
1048581   Certificate does not have its private key loaded (SB_ERROR_NO_PRIVATE_KEY)
1048581   Cancelled by the user (SB_ERROR_CANCELLED_BY_USER)
22020097   Failed to assemble a mail message (SB_ERROR_MAIL_ASSEMBLY_FAILED)
22020098   Failed to parse a mail message (SB_ERROR_MAIL_PARSING_FAILED)
22020099   Failed to decrypt a message because there is no decryption certificate provided (SB_ERROR_MAIL_NO_DECRYPTION_CERTIFICATE)