Why wouldn't you simply do something like this:
public static byte[] MD5Hash( byte[] salt, Stream s , int blockSize )
{
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider() ;
md5.Initialize();
md5.TransformBlock(salt,0,salt.Length,salt,0) ;
byte[] buf = new byte[blockSize];
int bufl ;
while ( (bufl=s.Read( buf , 0 , buf.Length )) > 0 )
{
md5.TransformBlock(buf,0,bufl,buf,0) ;
}
md5.TransformFinalBlock(buf,0,0) ;
return md5.Hash ;
}