<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Thank goodness for reference implementations [Low-overhead .NET MD5 implementation (source code and tests) works great on Silverlight!]</title><link>http://blogs.msdn.com/delay/archive/2009/01/28/thank-goodness-for-reference-implementations-low-overhead-net-md5-implementation-source-code-and-tests-works-great-on-silverlight.aspx</link><description>In yesterday's post announcing ComputeFileHashes's new support for MD5 on Silverlight , I promised to share some details about my experience getting an MD5 HashAlgorithm implementation for Silverlight. Recall that an MD5 class is available in the desktop</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>A managed MD5 implementation</title><link>http://blogs.msdn.com/delay/archive/2009/01/28/thank-goodness-for-reference-implementations-low-overhead-net-md5-implementation-source-code-and-tests-works-great-on-silverlight.aspx#9391359</link><pubDate>Mon, 02 Feb 2009 23:11:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9391359</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>Ambiguous contract is ambiguous [Minor bug fix for CRC32 and MD5Managed HashAlgorithm implementations]</title><link>http://blogs.msdn.com/delay/archive/2009/01/28/thank-goodness-for-reference-implementations-low-overhead-net-md5-implementation-source-code-and-tests-works-great-on-silverlight.aspx#9427274</link><pubDate>Tue, 17 Feb 2009 11:14:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9427274</guid><dc:creator>Delay's Blog</dc:creator><description>&lt;p&gt;Kind reader Gregor Zurowski contacted me over the weekend to let me know that he was using my free CRC-32&lt;/p&gt;
</description></item><item><title>re: Thank goodness for reference implementations [Low-overhead .NET MD5 implementation (source code and tests) works great on Silverlight!]</title><link>http://blogs.msdn.com/delay/archive/2009/01/28/thank-goodness-for-reference-implementations-low-overhead-net-md5-implementation-source-code-and-tests-works-great-on-silverlight.aspx#9442589</link><pubDate>Tue, 24 Feb 2009 15:14:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9442589</guid><dc:creator>LeeCarter</dc:creator><description>&lt;p&gt;OK, I can see that this is producing the same hash for known data as I get in C++ from using a sequence of:&lt;/p&gt;
&lt;p&gt;CryptAcquireContext()&lt;/p&gt;
&lt;p&gt;CryptCreateHash()&lt;/p&gt;
&lt;p&gt;CryptHashData()&lt;/p&gt;
&lt;p&gt;CryptGetHashParam()&lt;/p&gt;
&lt;p&gt;The CryptAcquireContext() and CryptCreateHash() are setup operations, the CryptHashData() adds data to be processed and finally CryptGetHashParam() gives the 16 byte hash value.&lt;/p&gt;
&lt;p&gt;With the C++ mechanism I can repeatedly call CryptHashData() to add more data to be hashed.&lt;/p&gt;
&lt;p&gt;With this and all the C# implementations I have seen they all appear to need all the data at once. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I need to process a large volume of data and get a MD5 hash code for it.&lt;/p&gt;
&lt;p&gt;Is there a way I can feed the data in a chunk at a time or do I have to buffer it all up and throw it in to ComputeHash() as a single operation?&lt;/p&gt;
</description></item><item><title>re: Thank goodness for reference implementations [Low-overhead .NET MD5 implementation (source code and tests) works great on Silverlight!]</title><link>http://blogs.msdn.com/delay/archive/2009/01/28/thank-goodness-for-reference-implementations-low-overhead-net-md5-implementation-source-code-and-tests-works-great-on-silverlight.aspx#9442973</link><pubDate>Tue, 24 Feb 2009 21:29:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9442973</guid><dc:creator>Delay</dc:creator><description>&lt;p&gt;Lee,&lt;/p&gt;
&lt;p&gt;If you have a look at the MD5ManagedTests.cs file in the ZIP linked to by this post, I demonstrate three ways of using HashAlgorithm. You're interested in the Initialize/TransformBlock/TransformFinalBlock pattern which processes arbitrarily-sized chunks of data. You just pass in whatever you've got until you're done, then you retrieve the computed hash value when it's all done. In addition to doing this in my test code, I follow this pattern in my ComputeFileHashes suite (also linked to by this post).&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
</description></item><item><title>re: Thank goodness for reference implementations [Low-overhead .NET MD5 implementation (source code and tests) works great on Silverlight!]</title><link>http://blogs.msdn.com/delay/archive/2009/01/28/thank-goodness-for-reference-implementations-low-overhead-net-md5-implementation-source-code-and-tests-works-great-on-silverlight.aspx#9443797</link><pubDate>Wed, 25 Feb 2009 12:11:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9443797</guid><dc:creator>LeeCarter</dc:creator><description>&lt;p&gt;Delay,&lt;/p&gt;
&lt;p&gt;Thank you for your response. &amp;nbsp;I've look at the test code in more detail now than I did at first and yes it will fit nicely into the scenario I want to try it in.&lt;/p&gt;
</description></item></channel></rss>