Docs

SecureBlackbox 2022 macOS Edition

Version 22.0 [Build 8174]

MailWriter Module

Properties   Methods   Events   Configuration Settings   Errors  

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

Syntax

SecureBlackbox.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 module with short descriptions. Click on the links for further details.

AttachEncodingThe encoding to be applied to the attachments.
AttachmentsContains a list of attachments to the message.
BccThe BCC header of the Message.
CcThe CC header of the Message.
CharsetThe charset to apply to Message .
EncryptionCertificatesThe recipients' encryption certificates.
ExternalCryptoProvides access to external signing and DC parameters.
FIPSModeReserved.
FromThe From header of the Message.
HeaderEncodingThe encoding to be applied to the message header.
MailerThe name of the software used to compose and/or send the message.
MessageThe message that is currently being composed.
OtherHeadersProvides access to secondary message headers.
ProfileSpecifies a pre-defined profile to apply when creating the signature.
ReplyToThe value of the Reply-To header field of the Message.
SecuritySettingsA container for the message's security settings.
SenderThe value of the Sender header field of the Message.
SendToThe value of the To header field of the Message.
SigningCertificateThe certificate to be used for signing.
SigningChainThe signing certificate chain.
TextEncodingThe encoding to be applied to the message.

Method List


The following is the full list of the methods of the module 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.

Event List


The following is the full list of the events fired by the module 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.

Configuration Settings


The following is a list of configuration settings for the module 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 module (supported for HTTPClient, RESTClient and SOAPClient only).
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.
TagAllows to store any custom data.
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 Module)

The encoding to be applied to the attachments.

Syntax

public var attachEncoding: MailwriterAttachEncodings {

get {...}
set {...} }

public enum MailwriterAttachEncodings: Int32 { case meAuto = 0 case me8bit = 1 case meBase64 = 2 case meQuotedPrintable = 3 }

@property (nonatomic,readwrite,assign,getter=attachEncoding,setter=setAttachEncoding:) int attachEncoding;

- (int)attachEncoding;
- (void)setAttachEncoding :(int)newAttachEncoding;

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Attachments Property (MailWriter Module)

Contains a list of attachments to the message.

Syntax

public var attachments: Array<MailAttachment> {

get {...} }

@property (nonatomic,readwrite,assign,getter=attachCount,setter=setAttachCount:) int attachCount;

- (int)attachCount;
- (void)setAttachCount :(int)newAttachCount;

- (NSString*)attachContentSubtype:(int)attachIndex;
- (void)setAttachContentSubtype:(int)attachIndex :(NSString*)newAttachContentSubtype;

- (NSString*)attachContentType:(int)attachIndex;
- (void)setAttachContentType:(int)attachIndex :(NSString*)newAttachContentType;

- (NSString*)attachCreationDate:(int)attachIndex;
- (void)setAttachCreationDate:(int)attachIndex :(NSString*)newAttachCreationDate;

- (NSData*)attachData:(int)attachIndex;
- (void)setAttachData:(int)attachIndex :(NSData*)newAttachData;

- (NSString*)attachDescription:(int)attachIndex;
- (void)setAttachDescription:(int)attachIndex :(NSString*)newAttachDescription;

- (NSString*)attachFilename:(int)attachIndex;
- (void)setAttachFilename:(int)attachIndex :(NSString*)newAttachFilename;

- (NSString*)attachID:(int)attachIndex;
- (void)setAttachID:(int)attachIndex :(NSString*)newAttachID;

- (NSString*)attachModificationDate:(int)attachIndex;
- (void)setAttachModificationDate:(int)attachIndex :(NSString*)newAttachModificationDate;

- (NSString*)attachReadDate:(int)attachIndex;
- (void)setAttachReadDate:(int)attachIndex :(NSString*)newAttachReadDate;

- (long long)attachSize:(int)attachIndex;
- (void)setAttachSize:(int)attachIndex :(long long)newAttachSize;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Bcc Property (MailWriter Module)

The BCC header of the Message.

Syntax

public var bcc: Array<MailAddress> {

get {...} }

@property (nonatomic,readwrite,assign,getter=bccAddrCount,setter=setBccAddrCount:) int bccAddrCount;

- (int)bccAddrCount;
- (void)setBccAddrCount :(int)newBccAddrCount;

- (NSString*)bccAddrAddress:(int)bccAddrIndex;
- (void)setBccAddrAddress:(int)bccAddrIndex :(NSString*)newBccAddrAddress;

- (NSString*)bccAddrDisplayName:(int)bccAddrIndex;
- (void)setBccAddrDisplayName:(int)bccAddrIndex :(NSString*)newBccAddrDisplayName;

- (NSString*)bccAddrGroupName:(int)bccAddrIndex;
- (void)setBccAddrGroupName:(int)bccAddrIndex :(NSString*)newBccAddrGroupName;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Cc Property (MailWriter Module)

The CC header of the Message.

Syntax

public var cc: Array<MailAddress> {

get {...} }

@property (nonatomic,readwrite,assign,getter=ccAddrCount,setter=setCcAddrCount:) int ccAddrCount;

- (int)ccAddrCount;
- (void)setCcAddrCount :(int)newCcAddrCount;

- (NSString*)ccAddrAddress:(int)ccAddrIndex;
- (void)setCcAddrAddress:(int)ccAddrIndex :(NSString*)newCcAddrAddress;

- (NSString*)ccAddrDisplayName:(int)ccAddrIndex;
- (void)setCcAddrDisplayName:(int)ccAddrIndex :(NSString*)newCcAddrDisplayName;

- (NSString*)ccAddrGroupName:(int)ccAddrIndex;
- (void)setCcAddrGroupName:(int)ccAddrIndex :(NSString*)newCcAddrGroupName;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Charset Property (MailWriter Module)

The charset to apply to Message .

Syntax

public var charset: String {

get {...}
set {...} }

@property (nonatomic,readwrite,assign,getter=charset,setter=setCharset:) NSString* charset;

- (NSString*)charset;
- (void)setCharset :(NSString*)newCharset;

Default Value

"utf-8"

Remarks

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

EncryptionCertificates Property (MailWriter Module)

The recipients' encryption certificates.

Syntax

public var encryptionCertificates: Array<Certificate> {

get {...} }

@property (nonatomic,readwrite,assign,getter=encryptionCertCount,setter=setEncryptionCertCount:) int encryptionCertCount;

- (int)encryptionCertCount;
- (void)setEncryptionCertCount :(int)newEncryptionCertCount;

- (NSData*)encryptionCertBytes:(int)encryptionCertIndex;

- (long long)encryptionCertHandle:(int)encryptionCertIndex;
- (void)setEncryptionCertHandle:(int)encryptionCertIndex :(long long)newEncryptionCertHandle;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

ExternalCrypto Property (MailWriter Module)

Provides access to external signing and DC parameters.

Syntax

public var externalCrypto: ExternalCrypto {

get {...} }

@property (nonatomic,readwrite,assign,getter=externalCryptoAsyncDocumentID,setter=setExternalCryptoAsyncDocumentID:) NSString* externalCryptoAsyncDocumentID;

- (NSString*)externalCryptoAsyncDocumentID;
- (void)setExternalCryptoAsyncDocumentID :(NSString*)newExternalCryptoAsyncDocumentID;

@property (nonatomic,readwrite,assign,getter=externalCryptoCustomParams,setter=setExternalCryptoCustomParams:) NSString* externalCryptoCustomParams;

- (NSString*)externalCryptoCustomParams;
- (void)setExternalCryptoCustomParams :(NSString*)newExternalCryptoCustomParams;

@property (nonatomic,readwrite,assign,getter=externalCryptoData,setter=setExternalCryptoData:) NSString* externalCryptoData;

- (NSString*)externalCryptoData;
- (void)setExternalCryptoData :(NSString*)newExternalCryptoData;

@property (nonatomic,readwrite,assign,getter=externalCryptoExternalHashCalculation,setter=setExternalCryptoExternalHashCalculation:) BOOL externalCryptoExternalHashCalculation;

- (BOOL)externalCryptoExternalHashCalculation;
- (void)setExternalCryptoExternalHashCalculation :(BOOL)newExternalCryptoExternalHashCalculation;

@property (nonatomic,readwrite,assign,getter=externalCryptoHashAlgorithm,setter=setExternalCryptoHashAlgorithm:) NSString* externalCryptoHashAlgorithm;

- (NSString*)externalCryptoHashAlgorithm;
- (void)setExternalCryptoHashAlgorithm :(NSString*)newExternalCryptoHashAlgorithm;

@property (nonatomic,readwrite,assign,getter=externalCryptoKeyID,setter=setExternalCryptoKeyID:) NSString* externalCryptoKeyID;

- (NSString*)externalCryptoKeyID;
- (void)setExternalCryptoKeyID :(NSString*)newExternalCryptoKeyID;

@property (nonatomic,readwrite,assign,getter=externalCryptoKeySecret,setter=setExternalCryptoKeySecret:) NSString* externalCryptoKeySecret;

- (NSString*)externalCryptoKeySecret;
- (void)setExternalCryptoKeySecret :(NSString*)newExternalCryptoKeySecret;

@property (nonatomic,readwrite,assign,getter=externalCryptoMethod,setter=setExternalCryptoMethod:) int externalCryptoMethod;

- (int)externalCryptoMethod;
- (void)setExternalCryptoMethod :(int)newExternalCryptoMethod;

@property (nonatomic,readwrite,assign,getter=externalCryptoMode,setter=setExternalCryptoMode:) int externalCryptoMode;

- (int)externalCryptoMode;
- (void)setExternalCryptoMode :(int)newExternalCryptoMode;

@property (nonatomic,readwrite,assign,getter=externalCryptoPublicKeyAlgorithm,setter=setExternalCryptoPublicKeyAlgorithm:) NSString* externalCryptoPublicKeyAlgorithm;

- (NSString*)externalCryptoPublicKeyAlgorithm;
- (void)setExternalCryptoPublicKeyAlgorithm :(NSString*)newExternalCryptoPublicKeyAlgorithm;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

FIPSMode Property (MailWriter Module)

Reserved.

Syntax

public var fipsMode: Bool {

get {...}
set {...} }

@property (nonatomic,readwrite,assign,getter=FIPSMode,setter=setFIPSMode:) BOOL FIPSMode;

- (BOOL)FIPSMode;
- (void)setFIPSMode :(BOOL)newFIPSMode;

Default Value

False

Remarks

This property is reserved for future use.

From Property (MailWriter Module)

The From header of the Message.

Syntax

public var from: Array<MailAddress> {

get {...} }

@property (nonatomic,readwrite,assign,getter=fromAddrCount,setter=setFromAddrCount:) int fromAddrCount;

- (int)fromAddrCount;
- (void)setFromAddrCount :(int)newFromAddrCount;

- (NSString*)fromAddrAddress:(int)fromAddrIndex;
- (void)setFromAddrAddress:(int)fromAddrIndex :(NSString*)newFromAddrAddress;

- (NSString*)fromAddrDisplayName:(int)fromAddrIndex;
- (void)setFromAddrDisplayName:(int)fromAddrIndex :(NSString*)newFromAddrDisplayName;

- (NSString*)fromAddrGroupName:(int)fromAddrIndex;
- (void)setFromAddrGroupName:(int)fromAddrIndex :(NSString*)newFromAddrGroupName;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

HeaderEncoding Property (MailWriter Module)

The encoding to be applied to the message header.

Syntax

public var headerEncoding: MailwriterHeaderEncodings {

get {...}
set {...} }

public enum MailwriterHeaderEncodings: Int32 { case meAuto = 0 case me8bit = 1 case meBase64 = 2 case meQuotedPrintable = 3 }

@property (nonatomic,readwrite,assign,getter=headerEncoding,setter=setHeaderEncoding:) int headerEncoding;

- (int)headerEncoding;
- (void)setHeaderEncoding :(int)newHeaderEncoding;

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Mailer Property (MailWriter Module)

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

Syntax

public var mailer: String {

get {...}
set {...} }

@property (nonatomic,readwrite,assign,getter=mailer,setter=setMailer:) NSString* mailer;

- (NSString*)mailer;
- (void)setMailer :(NSString*)newMailer;

Default Value

""

Remarks

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

Message Property (MailWriter Module)

The message that is currently being composed.

Syntax

public var message: MailMessage {

get {...}
set {...} }

@property (nonatomic,readonly,assign,getter=msgAttachmentCount) int msgAttachmentCount;

- (int)msgAttachmentCount;

@property (nonatomic,readwrite,assign,getter=msgBcc,setter=setMsgBcc:) NSString* msgBcc;

- (NSString*)msgBcc;
- (void)setMsgBcc :(NSString*)newMsgBcc;

@property (nonatomic,readwrite,assign,getter=msgCc,setter=setMsgCc:) NSString* msgCc;

- (NSString*)msgCc;
- (void)setMsgCc :(NSString*)newMsgCc;

@property (nonatomic,readwrite,assign,getter=msgComments,setter=setMsgComments:) NSString* msgComments;

- (NSString*)msgComments;
- (void)setMsgComments :(NSString*)newMsgComments;

@property (nonatomic,readwrite,assign,getter=msgDate,setter=setMsgDate:) NSString* msgDate;

- (NSString*)msgDate;
- (void)setMsgDate :(NSString*)newMsgDate;

@property (nonatomic,readwrite,assign,getter=msgDeliveryReceipt,setter=setMsgDeliveryReceipt:) BOOL msgDeliveryReceipt;

- (BOOL)msgDeliveryReceipt;
- (void)setMsgDeliveryReceipt :(BOOL)newMsgDeliveryReceipt;

@property (nonatomic,readwrite,assign,getter=msgFrom,setter=setMsgFrom:) NSString* msgFrom;

- (NSString*)msgFrom;
- (void)setMsgFrom :(NSString*)newMsgFrom;

@property (nonatomic,readwrite,assign,getter=msgHandle,setter=setMsgHandle:) long long msgHandle;

- (long long)msgHandle;
- (void)setMsgHandle :(long long)newMsgHandle;

@property (nonatomic,readwrite,assign,getter=msgHtmlText,setter=setMsgHtmlText:) NSString* msgHtmlText;

- (NSString*)msgHtmlText;
- (void)setMsgHtmlText :(NSString*)newMsgHtmlText;

@property (nonatomic,readwrite,assign,getter=msgID,setter=setMsgID:) NSString* msgID;

- (NSString*)msgID;
- (void)setMsgID :(NSString*)newMsgID;

@property (nonatomic,readwrite,assign,getter=msgInReplyTo,setter=setMsgInReplyTo:) NSString* msgInReplyTo;

- (NSString*)msgInReplyTo;
- (void)setMsgInReplyTo :(NSString*)newMsgInReplyTo;

@property (nonatomic,readwrite,assign,getter=msgKeywords,setter=setMsgKeywords:) NSString* msgKeywords;

- (NSString*)msgKeywords;
- (void)setMsgKeywords :(NSString*)newMsgKeywords;

@property (nonatomic,readonly,assign,getter=msgMailer) NSString* msgMailer;

- (NSString*)msgMailer;

@property (nonatomic,readwrite,assign,getter=msgPlainText,setter=setMsgPlainText:) NSString* msgPlainText;

- (NSString*)msgPlainText;
- (void)setMsgPlainText :(NSString*)newMsgPlainText;

@property (nonatomic,readwrite,assign,getter=msgPriority,setter=setMsgPriority:) int msgPriority;

- (int)msgPriority;
- (void)setMsgPriority :(int)newMsgPriority;

@property (nonatomic,readwrite,assign,getter=msgReadReceipt,setter=setMsgReadReceipt:) BOOL msgReadReceipt;

- (BOOL)msgReadReceipt;
- (void)setMsgReadReceipt :(BOOL)newMsgReadReceipt;

@property (nonatomic,readwrite,assign,getter=msgReferences,setter=setMsgReferences:) NSString* msgReferences;

- (NSString*)msgReferences;
- (void)setMsgReferences :(NSString*)newMsgReferences;

@property (nonatomic,readwrite,assign,getter=msgReplyTo,setter=setMsgReplyTo:) NSString* msgReplyTo;

- (NSString*)msgReplyTo;
- (void)setMsgReplyTo :(NSString*)newMsgReplyTo;

@property (nonatomic,readwrite,assign,getter=msgReturnPath,setter=setMsgReturnPath:) NSString* msgReturnPath;

- (NSString*)msgReturnPath;
- (void)setMsgReturnPath :(NSString*)newMsgReturnPath;

@property (nonatomic,readwrite,assign,getter=msgSender,setter=setMsgSender:) NSString* msgSender;

- (NSString*)msgSender;
- (void)setMsgSender :(NSString*)newMsgSender;

@property (nonatomic,readwrite,assign,getter=msgSendTo,setter=setMsgSendTo:) NSString* msgSendTo;

- (NSString*)msgSendTo;
- (void)setMsgSendTo :(NSString*)newMsgSendTo;

@property (nonatomic,readwrite,assign,getter=msgSubject,setter=setMsgSubject:) NSString* msgSubject;

- (NSString*)msgSubject;
- (void)setMsgSubject :(NSString*)newMsgSubject;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

OtherHeaders Property (MailWriter Module)

Provides access to secondary message headers.

Syntax

public var otherHeaders: Array<StringNameValuePair> {

get {...} }

@property (nonatomic,readwrite,assign,getter=headerFieldCount,setter=setHeaderFieldCount:) int headerFieldCount;

- (int)headerFieldCount;
- (void)setHeaderFieldCount :(int)newHeaderFieldCount;

- (NSString*)headerFieldName:(int)headerFieldIndex;
- (void)setHeaderFieldName:(int)headerFieldIndex :(NSString*)newHeaderFieldName;

- (NSString*)headerFieldValue:(int)headerFieldIndex;
- (void)setHeaderFieldValue:(int)headerFieldIndex :(NSString*)newHeaderFieldValue;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Profile Property (MailWriter Module)

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

Syntax

public var profile: String {

get {...}
set {...} }

@property (nonatomic,readwrite,assign,getter=profile,setter=setProfile:) NSString* profile;

- (NSString*)profile;
- (void)setProfile :(NSString*)newProfile;

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.

ReplyTo Property (MailWriter Module)

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

Syntax

public var replyTo: Array<MailAddress> {

get {...} }

@property (nonatomic,readwrite,assign,getter=replyToAddrCount,setter=setReplyToAddrCount:) int replyToAddrCount;

- (int)replyToAddrCount;
- (void)setReplyToAddrCount :(int)newReplyToAddrCount;

- (NSString*)replyToAddrAddress:(int)replyToAddrIndex;
- (void)setReplyToAddrAddress:(int)replyToAddrIndex :(NSString*)newReplyToAddrAddress;

- (NSString*)replyToAddrDisplayName:(int)replyToAddrIndex;
- (void)setReplyToAddrDisplayName:(int)replyToAddrIndex :(NSString*)newReplyToAddrDisplayName;

- (NSString*)replyToAddrGroupName:(int)replyToAddrIndex;
- (void)setReplyToAddrGroupName:(int)replyToAddrIndex :(NSString*)newReplyToAddrGroupName;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

SecuritySettings Property (MailWriter Module)

A container for the message's security settings.

Syntax

public var securitySettings: MailSecuritySettings {

get {...} }

@property (nonatomic,readwrite,assign,getter=secSettingsClaimedSigningTime,setter=setSecSettingsClaimedSigningTime:) NSString* secSettingsClaimedSigningTime;

- (NSString*)secSettingsClaimedSigningTime;
- (void)setSecSettingsClaimedSigningTime :(NSString*)newSecSettingsClaimedSigningTime;

@property (nonatomic,readwrite,assign,getter=secSettingsEncrypt,setter=setSecSettingsEncrypt:) BOOL secSettingsEncrypt;

- (BOOL)secSettingsEncrypt;
- (void)setSecSettingsEncrypt :(BOOL)newSecSettingsEncrypt;

@property (nonatomic,readwrite,assign,getter=secSettingsEncryptionAlgorithm,setter=setSecSettingsEncryptionAlgorithm:) NSString* secSettingsEncryptionAlgorithm;

- (NSString*)secSettingsEncryptionAlgorithm;
- (void)setSecSettingsEncryptionAlgorithm :(NSString*)newSecSettingsEncryptionAlgorithm;

@property (nonatomic,readwrite,assign,getter=secSettingsHashAlgorithm,setter=setSecSettingsHashAlgorithm:) NSString* secSettingsHashAlgorithm;

- (NSString*)secSettingsHashAlgorithm;
- (void)setSecSettingsHashAlgorithm :(NSString*)newSecSettingsHashAlgorithm;

@property (nonatomic,readwrite,assign,getter=secSettingsSign,setter=setSecSettingsSign:) BOOL secSettingsSign;

- (BOOL)secSettingsSign;
- (void)setSecSettingsSign :(BOOL)newSecSettingsSign;

@property (nonatomic,readwrite,assign,getter=secSettingsSignatureFormat,setter=setSecSettingsSignatureFormat:) int secSettingsSignatureFormat;

- (int)secSettingsSignatureFormat;
- (void)setSecSettingsSignatureFormat :(int)newSecSettingsSignatureFormat;

@property (nonatomic,readwrite,assign,getter=secSettingsSignBeforeEncrypt,setter=setSecSettingsSignBeforeEncrypt:) BOOL secSettingsSignBeforeEncrypt;

- (BOOL)secSettingsSignBeforeEncrypt;
- (void)setSecSettingsSignBeforeEncrypt :(BOOL)newSecSettingsSignBeforeEncrypt;

@property (nonatomic,readwrite,assign,getter=secSettingsSignMessageHeader,setter=setSecSettingsSignMessageHeader:) BOOL secSettingsSignMessageHeader;

- (BOOL)secSettingsSignMessageHeader;
- (void)setSecSettingsSignMessageHeader :(BOOL)newSecSettingsSignMessageHeader;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

Sender Property (MailWriter Module)

The value of the Sender header field of the Message.

Syntax

public var sender: MailAddress {

get {...}
set {...} }

@property (nonatomic,readwrite,assign,getter=senderAddrAddress,setter=setSenderAddrAddress:) NSString* senderAddrAddress;

- (NSString*)senderAddrAddress;
- (void)setSenderAddrAddress :(NSString*)newSenderAddrAddress;

@property (nonatomic,readwrite,assign,getter=senderAddrDisplayName,setter=setSenderAddrDisplayName:) NSString* senderAddrDisplayName;

- (NSString*)senderAddrDisplayName;
- (void)setSenderAddrDisplayName :(NSString*)newSenderAddrDisplayName;

@property (nonatomic,readwrite,assign,getter=senderAddrGroupName,setter=setSenderAddrGroupName:) NSString* senderAddrGroupName;

- (NSString*)senderAddrGroupName;
- (void)setSenderAddrGroupName :(NSString*)newSenderAddrGroupName;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

SendTo Property (MailWriter Module)

The value of the To header field of the Message.

Syntax

public var sendTo: Array<MailAddress> {

get {...} }

@property (nonatomic,readwrite,assign,getter=sendToAddrCount,setter=setSendToAddrCount:) int sendToAddrCount;

- (int)sendToAddrCount;
- (void)setSendToAddrCount :(int)newSendToAddrCount;

- (NSString*)sendToAddrAddress:(int)sendToAddrIndex;
- (void)setSendToAddrAddress:(int)sendToAddrIndex :(NSString*)newSendToAddrAddress;

- (NSString*)sendToAddrDisplayName:(int)sendToAddrIndex;
- (void)setSendToAddrDisplayName:(int)sendToAddrIndex :(NSString*)newSendToAddrDisplayName;

- (NSString*)sendToAddrGroupName:(int)sendToAddrIndex;
- (void)setSendToAddrGroupName:(int)sendToAddrIndex :(NSString*)newSendToAddrGroupName;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

SigningCertificate Property (MailWriter Module)

The certificate to be used for signing.

Syntax

public var signingCertificate: Certificate {

get {...}
set {...} }

@property (nonatomic,readonly,assign,getter=signingCertBytes) NSData* signingCertBytes;

- (NSData*)signingCertBytes;

@property (nonatomic,readwrite,assign,getter=signingCertHandle,setter=setSigningCertHandle:) long long signingCertHandle;

- (long long)signingCertHandle;
- (void)setSigningCertHandle :(long long)newSigningCertHandle;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

SigningChain Property (MailWriter Module)

The signing certificate chain.

Syntax

public var signingChain: Array<Certificate> {

get {...} }

@property (nonatomic,readwrite,assign,getter=signingChainCount,setter=setSigningChainCount:) int signingChainCount;

- (int)signingChainCount;
- (void)setSigningChainCount :(int)newSigningChainCount;

- (NSData*)signingChainBytes:(int)signingChainIndex;

- (long long)signingChainHandle:(int)signingChainIndex;
- (void)setSigningChainHandle:(int)signingChainIndex :(long long)newSigningChainHandle;

 

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

TextEncoding Property (MailWriter Module)

The encoding to be applied to the message.

Syntax

public var textEncoding: MailwriterTextEncodings {

get {...}
set {...} }

public enum MailwriterTextEncodings: Int32 { case meAuto = 0 case me8bit = 1 case meBase64 = 2 case meQuotedPrintable = 3 }

@property (nonatomic,readwrite,assign,getter=textEncoding,setter=setTextEncoding:) int textEncoding;

- (int)textEncoding;
- (void)setTextEncoding :(int)newTextEncoding;

Default Value

0

Remarks

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

meAuto0
me8bit1
meBase642
meQuotedPrintable3

AttachBytes Method (MailWriter Module)

Creates an attachment from a memory buffer.

Syntax

public func attachBytes(data: Data) throws -> Int32
- (int)attachBytes:(NSData*)data;

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.

AttachFile Method (MailWriter Module)

Creates an attachment from a file.

Syntax

public func attachFile(filename: String) throws -> Int32
- (int)attachFile:(NSString*)filename;

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.

AttachImage Method (MailWriter Module)

Creates an image attachment from a memory buffer.

Syntax

public func attachImage(id: String, data: Data) throws -> Int32
- (int)attachImage:(NSString*)ID :(NSData*)data;

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.

Config Method (MailWriter Module)

Sets or retrieves a configuration setting.

Syntax

public func config(configurationString: String) throws -> String
- (NSString*)config:(NSString*)configurationString;

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.

DoAction Method (MailWriter Module)

Performs an additional action.

Syntax

public func doAction(actionID: String, actionParams: String) throws -> String
- (NSString*)doAction:(NSString*)actionID :(NSString*)actionParams;

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 of the action is provided in ActionID parameter. ActionParams contains a list of parameters for the action in the form of PARAM1=VALUE1;PARAM2=VALUE2;....

SaveToBytes Method (MailWriter Module)

Serializes the message to a byte array.

Syntax

public func saveToBytes() throws -> Data
- (NSData*)saveToBytes;

Remarks

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

SaveToFile Method (MailWriter Module)

Serializes the message to a file.

Syntax

public func saveToFile(filename: String) throws -> Void
- (void)saveToFile:(NSString*)filename;

Remarks

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

Error Event (MailWriter Module)

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

Syntax

func onError(errorCode: Int32, description: String)
- (void)onError:(int)errorCode :(NSString*)description;

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 Module)

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

Syntax

func onExternalSign(operationId: String, hashAlgorithm: String, pars: String, data: String, signedData: inout String)
- (void)onExternalSign:(NSString*)operationId :(NSString*)hashAlgorithm :(NSString*)pars :(NSString*)data :(NSString**)signedData;

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 Module)

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

Syntax

func onNotification(eventID: String, eventParam: String)
- (void)onNotification:(NSString*)eventID :(NSString*)eventParam;

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.

Certificate Type

Provides details of an individual X.509 certificate.

Remarks

This type provides access to X.509 certificate details.

Fields

bytes
Data

Returns raw certificate data in DER format.

ca
Bool

Indicates whether the certificate has a CA capability (a setting in BasicConstraints extension).

caKeyID
Data

A unique identifier (fingerprint) of the CA certificate's private key.

Authority Key Identifier is a (non-critical) X.509 certificate extension which allows the identification of certificates produced by the same issuer, but with different public keys.

crlDistributionPoints
String

Locations of the CRL (Certificate Revocation List) distribution points used to check this certificate's validity.

curve
String

Specifies the elliptic curve of the EC public key.

SB_EC_SECP112R1SECP112R1
SB_EC_SECP112R2SECP112R2
SB_EC_SECP128R1SECP128R1
SB_EC_SECP128R2SECP128R2
SB_EC_SECP160K1SECP160K1
SB_EC_SECP160R1SECP160R1
SB_EC_SECP160R2SECP160R2
SB_EC_SECP192K1SECP192K1
SB_EC_SECP192R1SECP192R1
SB_EC_SECP224K1SECP224K1
SB_EC_SECP224R1SECP224R1
SB_EC_SECP256K1SECP256K1
SB_EC_SECP256R1SECP256R1
SB_EC_SECP384R1SECP384R1
SB_EC_SECP521R1SECP521R1
SB_EC_SECT113R1SECT113R1
SB_EC_SECT113R2SECT113R2
SB_EC_SECT131R1SECT131R1
SB_EC_SECT131R2SECT131R2
SB_EC_SECT163K1SECT163K1
SB_EC_SECT163R1SECT163R1
SB_EC_SECT163R2SECT163R2
SB_EC_SECT193R1SECT193R1
SB_EC_SECT193R2SECT193R2
SB_EC_SECT233K1SECT233K1
SB_EC_SECT233R1SECT233R1
SB_EC_SECT239K1SECT239K1
SB_EC_SECT283K1SECT283K1
SB_EC_SECT283R1SECT283R1
SB_EC_SECT409K1SECT409K1
SB_EC_SECT409R1SECT409R1
SB_EC_SECT571K1SECT571K1
SB_EC_SECT571R1SECT571R1
SB_EC_PRIME192V1PRIME192V1
SB_EC_PRIME192V2PRIME192V2
SB_EC_PRIME192V3PRIME192V3
SB_EC_PRIME239V1PRIME239V1
SB_EC_PRIME239V2PRIME239V2
SB_EC_PRIME239V3PRIME239V3
SB_EC_PRIME256V1PRIME256V1
SB_EC_C2PNB163V1C2PNB163V1
SB_EC_C2PNB163V2C2PNB163V2
SB_EC_C2PNB163V3C2PNB163V3
SB_EC_C2PNB176W1C2PNB176W1
SB_EC_C2TNB191V1C2TNB191V1
SB_EC_C2TNB191V2C2TNB191V2
SB_EC_C2TNB191V3C2TNB191V3
SB_EC_C2ONB191V4C2ONB191V4
SB_EC_C2ONB191V5C2ONB191V5
SB_EC_C2PNB208W1C2PNB208W1
SB_EC_C2TNB239V1C2TNB239V1
SB_EC_C2TNB239V2C2TNB239V2
SB_EC_C2TNB239V3C2TNB239V3
SB_EC_C2ONB239V4C2ONB239V4
SB_EC_C2ONB239V5C2ONB239V5
SB_EC_C2PNB272W1C2PNB272W1
SB_EC_C2PNB304W1C2PNB304W1
SB_EC_C2TNB359V1C2TNB359V1
SB_EC_C2PNB368W1C2PNB368W1
SB_EC_C2TNB431R1C2TNB431R1
SB_EC_NISTP192NISTP192
SB_EC_NISTP224NISTP224
SB_EC_NISTP256NISTP256
SB_EC_NISTP384NISTP384
SB_EC_NISTP521NISTP521
SB_EC_NISTB163NISTB163
SB_EC_NISTB233NISTB233
SB_EC_NISTB283NISTB283
SB_EC_NISTB409NISTB409
SB_EC_NISTB571NISTB571
SB_EC_NISTK163NISTK163
SB_EC_NISTK233NISTK233
SB_EC_NISTK283NISTK283
SB_EC_NISTK409NISTK409
SB_EC_NISTK571NISTK571
SB_EC_GOSTCPTESTGOSTCPTEST
SB_EC_GOSTCPAGOSTCPA
SB_EC_GOSTCPBGOSTCPB
SB_EC_GOSTCPCGOSTCPC
SB_EC_GOSTCPXCHAGOSTCPXCHA
SB_EC_GOSTCPXCHBGOSTCPXCHB
SB_EC_BRAINPOOLP160R1BRAINPOOLP160R1
SB_EC_BRAINPOOLP160T1BRAINPOOLP160T1
SB_EC_BRAINPOOLP192R1BRAINPOOLP192R1
SB_EC_BRAINPOOLP192T1BRAINPOOLP192T1
SB_EC_BRAINPOOLP224R1BRAINPOOLP224R1
SB_EC_BRAINPOOLP224T1BRAINPOOLP224T1
SB_EC_BRAINPOOLP256R1BRAINPOOLP256R1
SB_EC_BRAINPOOLP256T1BRAINPOOLP256T1
SB_EC_BRAINPOOLP320R1BRAINPOOLP320R1
SB_EC_BRAINPOOLP320T1BRAINPOOLP320T1
SB_EC_BRAINPOOLP384R1BRAINPOOLP384R1
SB_EC_BRAINPOOLP384T1BRAINPOOLP384T1
SB_EC_BRAINPOOLP512R1BRAINPOOLP512R1
SB_EC_BRAINPOOLP512T1BRAINPOOLP512T1
SB_EC_CURVE25519CURVE25519
SB_EC_CURVE448CURVE448

fingerprint
Data

Contains the fingerprint (a hash imprint) of this certificate.

friendlyName
String

Contains an associated alias (friendly name) of the certificate.

handle
Int64

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());

hashAlgorithm
String

Specifies the hash algorithm to be used in the operations on the certificate (such as key signing)

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

issuer
String

The common name of the certificate issuer (CA), typically a company name.

issuerRDN
String

A collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate issuer.

keyAlgorithm
String

Specifies the public key algorithm of this certificate.

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

keyBits
Int32

Returns the length of the public key.

keyFingerprint
Data

Returns a fingerprint of the public key contained in the certificate.

keyUsage
Int32

Indicates the purposes of the key contained in the certificate, in the form of an OR'ed flag set.

This value is a bit mask of the following values:

ckuUnknown0x00000Unknown key usage

ckuDigitalSignature0x00001Digital signature

ckuNonRepudiation0x00002Non-repudiation

ckuKeyEncipherment0x00004Key encipherment

ckuDataEncipherment0x00008Data encipherment

ckuKeyAgreement0x00010Key agreement

ckuKeyCertSign0x00020Certificate signing

ckuCRLSign0x00040Revocation signing

ckuEncipherOnly0x00080Encipher only

ckuDecipherOnly0x00100Decipher only

ckuServerAuthentication0x00200Server authentication

ckuClientAuthentication0x00400Client authentication

ckuCodeSigning0x00800Code signing

ckuEmailProtection0x01000Email protection

ckuTimeStamping0x02000Timestamping

ckuOCSPSigning0x04000OCSP signing

ckuSmartCardLogon0x08000Smartcard logon

ckuKeyPurposeClientAuth0x10000Kerberos - client authentication

ckuKeyPurposeKDC0x20000Kerberos - KDC

keyValid
Bool

Returns True if the certificate's key is cryptographically valid, and False otherwise.

ocspLocations
String

Locations of OCSP (Online Certificate Status Protocol) services that can be used to check this certificate's validity, as recorded by the CA.

ocspNoCheck
Bool

TBD.

origin
Int32

Returns the origin of this certificate.

policyIDs
String

Contains identifiers (OIDs) of the applicable certificate policies.

The Certificate Policies extension identifies a sequence of policies under which the certificate has been issued, and which regulate its usage.

privateKeyBytes
Data

Contains the certificate's private key. It is normal for this property to be empty if the private key is non-exportable.

privateKeyExists
Bool

Indicates whether the certificate has an associated private key.

privateKeyExtractable
Bool

Indicates whether the private key is extractable

publicKeyBytes
Data

Contains the certificate's public key in DER format.

qualifiedStatements
QualifiedStatementsTypes

TBD

selfSigned
Bool

Indicates whether the certificate is self-signed (root) or signed by an external CA.

serialNumber
Data

Returns the certificate's serial number.

sigAlgorithm
String

Indicates the algorithm that was used by the CA to sign this certificate.

subject
String

The common name of the certificate holder, typically an individual's name, a URL, an e-mail address, or a company name.

subjectAlternativeName
String

TBD.

subjectKeyID
Data

Contains a unique identifier (fingerprint) of the certificate's private key.

Subject Key Identifier is a (non-critical) X.509 certificate extension which allows the identification of certificates containing a particular public key. In SecureBlackbox, the unique identifier is represented with a SHA1 hash of the bit string of the subject public key.

subjectRDN
String

A collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate holder (subject).

validFrom
String

The time point at which the certificate becomes valid, in UTC.

validTo
String

The time point at which the certificate expires, in UTC.

Constructors

public init(stream: InputStream?)

Loads the X.509 certificate from a stream. Stream is a stream containing the certificate data.

public init()

Creates a new object with default field values.

ExternalCrypto Type

Specifies the parameters of external cryptographic calls.

Remarks

External cryptocalls are used in a Distributed Cryptography (DC) subsystem, which allows the delegation of security operations to the remote agent. For instance, it can be used to compute the signature value on the server, while retaining the client's private key locally.

Fields

asyncDocumentID
String

Specifies the document ID for SignAsyncEnd() call

Use this property when working with multi-signature DCAuth requests and responses to uniquely identify documents signed within a larger batch. This value helps ASiCSigner 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.

customParams
String

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

data
String

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

externalHashCalculation
Bool

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.

hashAlgorithm
String

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

keyID
String

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 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";

keySecret
String

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 topic.

method
AsyncSignMethods

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

Available options:

asmdPKCS10
asmdPKCS71

mode
ExternalCryptoModes

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)

publicKeyAlgorithm
String

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

Constructors

public init()

Creates a new ExternalCrypto object with default field values.

MailAddress Type

A container for an e-mail addressee.

Remarks

This object is a container for an e-mail identity record. A typical e-mail address consists of an RFC822 e-mail address (john@doe.com), a friendly name (John Doe), and a group name (Officers).

Fields

address
String

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

displayName
String

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

groupName
String

The name of the group this address belongs to.

Constructors

public init(address: String)

Creates a new e-mail address object.

public init(displayName: String, address: String)

Creates a new e-mail address object from an address and a display name.

MailAttachment Type

Represents an attachment to an e-mail message.

Remarks

This object is a container for message attachments.

Fields

contentSubtype
String

Contains the content subtype of the attachment.

contentType
String

Contain the content type of the attachment.

creationDate
String

The creation date.

data
Data

The content of the attachment.

description_
String

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.

filename
String

Specifies the name of the attachment file.

id
String

Contains the attachment's unique identifier.

modificationDate
String

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

readDate
String

Specifies the file's last read date.

size
Int64

Attachment's size in bytes.

Constructors

public init(contentType: String)

Creates an empty mail attachment object.

MailMessage Type

Represents an e-mail message.

Remarks

This object is a container for an e-mail message.

A message consists of a header and a body. The header, in turn, consists of several header fields. The names, syntax, and expected contents of the header fields are standardized.

The message body can contain anything you like (a message may not even have a body at all).

Fields

attachmentCount
Int32

Returns the number of attachments in this message.

bcc
String

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.

cc
String

The value of the CC header field.

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

comments
String

Contains additional information about the message body.

date
String

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.

deliveryReceipt
Bool

Enables delivery notification.

from
String

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 to specify the sender separately.

handle
Int64

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());

htmlText
String

The HTML version of the message.

id
String

The contents of the Message-ID header field.

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

inReplyTo
String

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.

keywords
String

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.

mailer
String

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

plainText
String

The plain text version of the message.

priority
MailPriorities

Specifies the message priority.

Available options:

mpLowest0
mpLow1
mpNormal2
mpHigh3
mpHighest4

readReceipt
Bool

Enables a read notification.

references
String

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.

replyTo
String

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 field.

returnPath
String

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.

sender
String

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.

sendTo
String

The value of the To header field.

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

subject
String

Contains the subject field of this message.

Constructors

public init()

Creates a new empty mail message object.

MailSecuritySettings Type

Provides access to the new message security settings.

Remarks

Use this object to tune up the security setting for the created message.

Fields

claimedSigningTime
String

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.

encrypt
Bool

Whether to encrypt the message.

encryptionAlgorithm
String

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

hashAlgorithm
String

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

sign
Bool

Whether to sign the message.

signatureFormat
MailSignatureFormats

Specifies the signature format to use for the signed message.

Available options:

msMultipartSigned0
msSignedData1

signBeforeEncrypt
Bool

Specifies the order of encryption and signing operations.

signMessageHeader
Bool

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

Constructors

public init()

Creates a new MailSecuritySettings object.

StringNameValuePair Type

A simple name-value pair object.

Remarks

The class represents a name-value string pair used in a variety of network components.

Fields

name
String

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

value
String

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

Constructors

public init(name: String, value: String)

Creates a name-value pair from a name and a value.

public init()

Creates an empty name-value object.

Configuration Settings (MailWriter Module)

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 Configuration 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 Configuration 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 (supported for HTTPClient, RESTClient and SOAPClient only)
globalGlobal caching

Cookies:   Gets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only).

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.

Tag:   Allows to store any custom data.

Use this config property to store any custom data.

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 Module)

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)

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2022 macOS Edition - Version 22.0 [Build 8174]