| « Monado |
bir dosyanın hash'i nasıl alınır ?
public string GetHashCode( string filePath )
{
FileStream m_Stream = null;
try
{
MD5 m_md5 = new MD5CryptoServiceProvider();
FileStream m_Stream = new FileStream( filePath, FileMode.Open, FileAccess.Read, FileShare.Read );
return m_md5.ComputeHash( stream );
}
finally
{
if ( m_Stream != null)
m_Stream.Close();
}
}