cadencii.Misc.getmd5 C# (CSharp) Method

getmd5() public static method

public static getmd5 ( FileStream file_stream ) : string
file_stream System.IO.FileStream
return string
        public static string getmd5( FileStream file_stream ) {
            MD5 md5 = MD5.Create();
            byte[] hash = md5.ComputeHash( file_stream );
            return BitConverter.ToString( hash ).ToLower().Replace( "-", "_" );
        }

Same methods

Misc::getmd5 ( string s ) : string

Usage Example

Exemplo n.º 1
0
        public static string getMD5(string file)
        {
            string ret = "";

            using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read)) {
                ret = Misc.getmd5(fs);
            }
            return(ret);
        }
All Usage Examples Of cadencii.Misc::getmd5