Table of Contents

Class MessageHelper

Namespace
SecureExchangesSDK.Helpers
Assembly
SecureExchangesSDK.NetCore.dll

This class is use to send and retreived message from Secure Exchanges

public static class MessageHelper
Inheritance
MessageHelper
Inherited Members

Methods

BuildAttachmentOnlyEncryptedBody(string, string, HandShake)

Builds the encrypted email Body for attachment-only mode by decrypting the AttachmentsOnlyBody template, appending the cleartext message after it, and re-encrypting the result with the same handshake key. Used when relaying through SEMS so the recipient sees the message in clear in the email body while attachments remain behind the secure link.

public static string BuildAttachmentOnlyEncryptedBody(string encryptedAttachmentsOnlyBodyB64, string clearMessage, HandShake handShake)

Parameters

encryptedAttachmentsOnlyBodyB64 string

Base64 of the AttachmentsOnlyBody template encrypted with key/iv.

clearMessage string

Cleartext message to append after the template. Null/empty is allowed.

handShake HandShake

Handshake holding the metadata channel key.

Returns

string

Base64 of the new combined body, encrypted on the metadata channel.

DeleteMessageByTrackingId(DeleteMessageByTrackingIdArgs)

Delete message by tracking id, tracking id came from log

public static bool DeleteMessageByTrackingId(DeleteMessageByTrackingIdArgs args)

Parameters

args DeleteMessageByTrackingIdArgs

Returns

bool

EncryptMessage(EncryptMessageArgs)

Encrypt a single message. Must use MultiRecipientMessage to send the same message to one or more recipient

[Obsolete("Please use the MultiRecipientMessage")]
public static SendMessageAnswer EncryptMessage(EncryptMessageArgs args)

Parameters

args EncryptMessageArgs

Returns

SendMessageAnswer

ExtenMessageLive(ExtenMessageLiveArgs)

Extends the live time of a message that is currently being viewed.

public static bool ExtenMessageLive(ExtenMessageLiveArgs args)

Parameters

args ExtenMessageLiveArgs

The arguments containing the message ID and extend token.

Returns

bool

true if successfully extended; otherwise, false.

GetEnvelopes(GetEnvelopesArgs)

Returns multiple envelopes, one per recipient. When a phone is used the 2FA is activated.

public static GetEnvelopesResponse GetEnvelopes(GetEnvelopesArgs args)

Parameters

args GetEnvelopesArgs

Envelope arguments with the list of recipients.

Returns

GetEnvelopesResponse

A GetEnvelopesResponse containing one envelope per recipient.

GetEnveloppe(GetEnveloppeArgs)

Creates a link for a recipient to send back information (envelope/reply).

public static GetEnveloppeResponse GetEnveloppe(GetEnveloppeArgs args)

Parameters

args GetEnveloppeArgs

Envelope arguments for a single recipient.

Returns

GetEnveloppeResponse

A GetEnveloppeResponse containing the URL and RepID.

GetMessage(GetMessageArgs)

This method is used to decrypt a message from Secure Exchanges

public static GetMessageResponse GetMessage(GetMessageArgs args)

Parameters

args GetMessageArgs

GetMessageArgs

Returns

GetMessageResponse

GetMessageResponse

This method is create to parse a link from Secure Exchanges

public static SecureExchangesMessage GetSecureExchangesMessageFromLink(string link)

Parameters

link string

Secure Exchanges read message link

Returns

SecureExchangesMessage

Secure Exchanges Message

GetSerialInfo(GetSerialInfoArgs)

[Obsolete("Please use the method in the LicenceHelper")]
public static GetSerialInfoResponse GetSerialInfo(GetSerialInfoArgs args)

Parameters

args GetSerialInfoArgs

Returns

GetSerialInfoResponse

InitializeSMS(ISEMSInitialization)

This method only initialize SEMS Keys to send the SMS when a message contains a digit

public static GetKeysAnswer InitializeSMS(ISEMSInitialization args)

Parameters

args ISEMSInitialization

Returns

GetKeysAnswer

MultiRecipientMessage(MutliRecipientArgs)

Use to send the same message to multiple recipident. Each recipient will received a unique link. They will received a unique SMS code if use it, and will share the same password.

public static MultiRecipientAnswer MultiRecipientMessage(MutliRecipientArgs args)

Parameters

args MutliRecipientArgs

Returns

MultiRecipientAnswer

Return an answer to manage the message send

MultiRecipientMessage(MutliRecipientArgs, FileHelper)

Use to send the same message to multiple recipident. Each recipient will received a unique link. They will received a unique SMS code if use it, and will share the same password.

public static MultiRecipientAnswer MultiRecipientMessage(MutliRecipientArgs args, FileHelper fileHelper)

Parameters

args MutliRecipientArgs
fileHelper FileHelper

Returns

MultiRecipientAnswer

Return an answer to manage the message send

SendTrace(SendTraceArgs)

To send support trace to Secure Exchanges Team

public static bool SendTrace(SendTraceArgs args)

Parameters

args SendTraceArgs

Returns

bool

TransformSECryptedMail(SEMail, string, SendMessageAnswer, bool, HandShake, byte[], byte[])

Transform a SEMail encrypted to a SEMail unencrypted

public static SEMail TransformSECryptedMail(SEMail mail, string urlParameters, SendMessageAnswer answer, bool isPassword, HandShake handShake, byte[] aesKey, byte[] aesIv)

Parameters

mail SEMail
urlParameters string
answer SendMessageAnswer
isPassword bool
handShake HandShake
aesKey byte[]
aesIv byte[]

Returns

SEMail