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
encryptedAttachmentsOnlyBodyB64stringBase64 of the AttachmentsOnlyBody template encrypted with key/iv.
clearMessagestringCleartext message to append after the template. Null/empty is allowed.
handShakeHandShakeHandshake 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
Returns
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
argsEncryptMessageArgs
Returns
ExtenMessageLive(ExtenMessageLiveArgs)
Extends the live time of a message that is currently being viewed.
public static bool ExtenMessageLive(ExtenMessageLiveArgs args)
Parameters
argsExtenMessageLiveArgsThe 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
argsGetEnvelopesArgsEnvelope 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
argsGetEnveloppeArgsEnvelope 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
argsGetMessageArgsGetMessageArgs
Returns
- GetMessageResponse
GetMessageResponse
GetSecureExchangesMessageFromLink(string)
This method is create to parse a link from Secure Exchanges
public static SecureExchangesMessage GetSecureExchangesMessageFromLink(string link)
Parameters
linkstringSecure 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
argsGetSerialInfoArgs
Returns
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
argsISEMSInitialization
Returns
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
argsMutliRecipientArgs
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
argsMutliRecipientArgsfileHelperFileHelper
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
argsSendTraceArgs
Returns
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
mailSEMailurlParametersstringanswerSendMessageAnswerisPasswordboolhandShakeHandShakeaesKeybyte[]aesIvbyte[]