Framework EDI Reference. Methods and Properties
mailMessage. MicValue

Gets the Message Integrity Check (MIC) value of the message.

Syntax:

 

Remarks:

The MIC value is the base64-encoded digest of the message.  The digest is calculated as follows:

The algorithm used to calculate the MIC value is stored in the MicAlgorithm property.

 

Example:

Dim oMailDocument As Fredi.mailDocument
Dim oSubjMsg As Fredi.mailMessage
Dim sMicValue As String

Set oMailDocument = oEdiDoc.GetMailDocument
Set oSubjMsg = oMailDocument.GetMessage

' Configure the security of this message.
' Specify the signing algorithm to use for MIC calculation
Dim oSecurity As Fredi.ediSecurity
Set oSecurity = oSubjMsg.GetSecurity
oSecurity.AssuranceAlgorithm = "sha1"

oSubjMsg.Import(sPath)

oSubjMsg.HeaderFieldValue("AS2-Version") = "1.0"
oSubjMsg.HeaderFieldValue("AS2-To") = "abc@example.com"
oSubjMsg.HeaderFieldValue("AS2-From") = "myMail@example.com"

' Encode the message to base 64
oSubjMsg.EncodingBase64 = True

' Request that an MDN be returned
oSubjMsg.RequestSignedMDN()

' Capture MIC value
sMicValue = oSubjMsg.MicValue