Framework EDI Reference. Methods and Properties
mailMessage. GenerateDigest

Calculates and return the digest of the message or parts of the message.

Syntax:

Parameters:

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oSubjMsg As Fredi.mailMessage
Dim oSecurity As Fredi.ediSecurity
Dim sDigestShow As String

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

' Load EDI document normally.
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get the subject message
Set oSubjMsg = oMailDocument.GetMessage

' Get the message's security.
Set oSecurity = oSubjMsg.GetSecurity
oSecurity.CertificateSignerName = "Edidev Test Sender"
oSecurity.AssuranceAlgorithm = "sha-1"

sDigestShow = sDigestShow & "Message Digest: " & oSubjMsg.GenerateDigest(Message_All, EncodeType_Base64)
sDigestShow = sDigestShow & vbCrLf
sDigestShow = sDigestShow & "Body Digest: " & oSubjMsg.GenerateDigest(Message_Body, EncodeType_Base64)
sDigestShow = sDigestShow & vbCrLf
sDigestShow = sDigestShow & "Header Digest: " & oSubjMsg.GenerateDigest(Message_Header, EncodeType_Base64)
sDigestShow = sDigestShow & vbCrLf

MsgBox sDigestShow

 

Samples