// Token: 0x06002650 RID: 9808 RVA: 0x0008A854 File Offset: 0x00088A54 private static byte[] CalculateFileHash(FileInfo fileInfo) { if (fileInfo.Exists) { using (SHA1Cng sha1Cng = new SHA1Cng()) { using (FileStream fileStream = fileInfo.OpenRead()) { sha1Cng.Initialize(); return(sha1Cng.ComputeHash(fileStream)); } } } return(new byte[0]); }
// Token: 0x06002635 RID: 9781 RVA: 0x00089E5C File Offset: 0x0008805C public static byte[] CalculateHashOnHashes(List <byte[]> hashes) { int num = 0; for (int i = 0; i < hashes.Count; i++) { num += hashes[i].Length; } byte[] array = new byte[num]; num = 0; for (int j = 0; j < hashes.Count; j++) { hashes[j].CopyTo(array, num); num += hashes[j].Length; } byte[] result; using (SHA1Cng sha1Cng = new SHA1Cng()) { sha1Cng.Initialize(); result = sha1Cng.ComputeHash(array); } return(result); }