Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: MD5Digest(Message-ID) Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
boranin
Newbie
Newbie


Joined: 29 September 2007
Location: New Zealand
Online Status: Offline
Posts: 32
Posted: 22 February 2008 at 11:37pm | IP Logged Quote boranin

Could you please give us full (VB) function for "MD5Digest(Message-ID)" as used in MailMessage.GetHtmlAndSaveRelatedFiles Method when Dynamic mode used?
Regards,
Alex
Back to Top View boranin's Profile Search for other posts by boranin
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 23 February 2008 at 8:48am | IP Logged Quote Alex

Internally, we call CreateMD5Digest(message.MessageID). CreateMD5Digest is defined as follows (actually, C#, as MailBee.NET is written in C#):
Code:

           private static string CreateMD5Digest(string paramValue)
           {
                StringBuilder  result = new StringBuilder();
                MD5  hash = new MD5CryptoServiceProvider();
                byte [] hashBytes = hash.ComputeHash(Encoding.Default.GetBytes(paramValue));
                foreach(byte  b in hashBytes)
                 {
                      result.Append(b.ToString("X2",  CultureInfo.InvariantCulture));
                }
                return  result.ToString();
           }


The code has no external dependencies on other classes of MailBee.NET Objects.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
boranin
Newbie
Newbie


Joined: 29 September 2007
Location: New Zealand
Online Status: Offline
Posts: 32
Posted: 24 February 2008 at 3:48am | IP Logged Quote boranin

Thanks for the code. It has been very helpfull.
Regards,
Alex
Back to Top View boranin's Profile Search for other posts by boranin
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide