Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MD5 Hash
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Title:
MD5 Hash
Miscellaneous
Thread ID:
01398270
Message ID:
01398270
Views:
154
I am struggling to create an MD5 hash in VFP and I can then compare to a hash in .Net.

I am using VFPEncryption.FLL to generate a MD5Hash that I then STRCONV (hashResult,15) and send to my .Net web service.

In .Net I am using:
          MD5 md5 = new MD5CryptoServiceProvider();
            var result = md5.ComputeHash(bytes);

            var SB = new StringBuilder();
            var sb = new StringBuilder();
            for (var i = 0; i < result.Length; i++)
            {
                sb.Append(result[i].ToString("X2"));
                SB.Append(result[i].ToString("x2"));
            }
            return sb.ToString();
But the results are never equal.

I have compared the input to both functions and they are equal.

Am I taking the wrong approach?

Any insight you could provide would be greatly appreciated.
Bud Wheeler
Vision Data Solutions, Inc.
Microsoft Partner

http://www.visionpace.com
Http://www.BudWheeler.com
Next
Reply
Map
View

Click here to load this message in the networking platform