string hash = null; using (System.Security.Cryptography.SHA1CryptoServiceProvider sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider()) { System.Drawing.Imaging.ImageFormat format = System.Drawing.Imaging.ImageFormat.Jpeg; System.Drawing.Image myImage = System.Drawing.Image.FromFile(path + f.ToString()); myImage.Save(ms, format); hash = Convert.ToBase64String(sha1.ComputeHash(ms.ToArray())); }
沒有留言:
張貼留言
留個話吧:)