GetMD5DigestOfArray Method


Returns MD5 irreversible digest for the specified byte array.

The example in this topic calculates MD5 digest of attachment (it's assumed the message has at least one attachment).


strDigest = ObjectName.GetMD5DigestOfArray(Data)  
Parameters:  
Data As Variant The byte array to get MD5 digest for  
Return value As String MD5 digest of the specified byte array  

Usage example:

Dim Mailer, Msg

Set Mailer = CreateObject("MailBee.POP3")
Mailer.LicenseKey = "put your license key here"
If Mailer.Connect("mailserver.com", 110, "MyName", "MyPassword") Then
  If Mailer.MessageCount > 0 Then
    Set Msg = Mailer.RetrieveSingleMessage(1)
    If Msg.Attachments.Count > 0 Then
      MsgBox Msg.GetMD5Digest(Msg.Attachments(1).ContentAsArray)
    End If
  End If
  Mailer.Disconnect
End If

See Also:

GetMD5Digest Method


Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.