Class MessageHelper
- Espace de noms
- SecureExchangesSDK.Helpers
- Assembly
- SecureExchangesSDK.NetCore.dll
This class is use to send and retreived message from Secure Exchanges
public static class MessageHelper
- Héritage
-
MessageHelper
- Membres hérités
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)
Paramètres
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.
Retour
- 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)
Paramètres
Retour
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)
Paramètres
argsEncryptMessageArgs
Retour
ExtenMessageLive(ExtenMessageLiveArgs)
Extends the live time of a message that is currently being viewed.
public static bool ExtenMessageLive(ExtenMessageLiveArgs args)
Paramètres
argsExtenMessageLiveArgsThe arguments containing the message ID and extend token.
Retour
- 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)
Paramètres
argsGetEnvelopesArgsEnvelope arguments with the list of recipients.
Retour
- 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)
Paramètres
argsGetEnveloppeArgsEnvelope arguments for a single recipient.
Retour
- 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)
Paramètres
argsGetMessageArgsGetMessageArgs
Retour
- GetMessageResponse
GetMessageResponse
GetSecureExchangesMessageFromLink(string)
This method is create to parse a link from Secure Exchanges
public static SecureExchangesMessage GetSecureExchangesMessageFromLink(string link)
Paramètres
linkstringSecure Exchanges read message link
Retour
- SecureExchangesMessage
Secure Exchanges Message
GetSerialInfo(GetSerialInfoArgs)
[Obsolete("Please use the method in the LicenceHelper")]
public static GetSerialInfoResponse GetSerialInfo(GetSerialInfoArgs args)
Paramètres
argsGetSerialInfoArgs
Retour
InitializeSMS(ISEMSInitialization)
This method only initialize SEMS Keys to send the SMS when a message contains a digit
public static GetKeysAnswer InitializeSMS(ISEMSInitialization args)
Paramètres
argsISEMSInitialization
Retour
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)
Paramètres
argsMutliRecipientArgs
Retour
- 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)
Paramètres
argsMutliRecipientArgsfileHelperFileHelper
Retour
- 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)
Paramètres
argsSendTraceArgs
Retour
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)
Paramètres
mailSEMailurlParametersstringanswerSendMessageAnswerisPasswordboolhandShakeHandShakeaesKeybyte[]aesIvbyte[]