Exemplo n.º 1
0
 /// <summary>
 ///     For old office file hash is filename
 /// </summary>
 /// <param name="fileName"></param>
 /// <param name="folderName"></param>
 /// <returns></returns>
 public static string GetHash(string fileName, string folderName, out string lastError)
 {
     return(DefaultHash.getHash(fileName, out lastError));
 }
Exemplo n.º 2
0
        /// <summary>
        ///     get hash form file
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns>string containing hash. Return -1 on error, message in lastError string</returns>
        public static string GetHash(string fileName, out string lastError)
        {
            lastError = null;
            string ext;
            var    xmlOfficeFile = isOfficeFile(fileName, out ext);

            if (!xmlOfficeFile)
            {
                ;
            }

            return(xmlOfficeFile ? XmlOfficeHash.GetHash(fileName, XmlOfficeHash.ExtFiles[ext], out lastError) : DefaultHash.getHash(fileName, out lastError));
        }