Right now, the HashAlgorithm.ComputeHash method always creates a new byte array to return the computed hash. Creating a new byte array is wasteful in the case where the caller has an array available for receiving the hash.
How about, in a future version of .NET, having a variant of ComputeHash that accepts arguments that specify where the computed hash is to be returned, e.g., two arguments, one specifying a byte array and the other specifying an offset into the array?
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.