CmisSync.Lib.Cmis.Database.Checksum C# (CSharp) Метод

Checksum() приватный Метод

Calculate the SHA1 checksum of a file. Code from http://stackoverflow.com/a/1993919/226958
private Checksum ( string filePath ) : string
filePath string
Результат string
        private string Checksum(string filePath)
        {
            using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
            using (var bs = new BufferedStream(fs))
            {
                using (var sha1 = new SHA1Managed())
                {
                    byte[] hash = sha1.ComputeHash(bs);
                    return ChecksumToString(hash);
                }
            }
        }