// Token: 0x06002AC0 RID: 10944 RVA: 0x0009EB20 File Offset: 0x0009CD20 private static Type GetDefaultHashImplementationOrFallback(Type hashAlgorithm, Type fallbackImplementation) { Type defaultHashImplementation = Hash.GetDefaultHashImplementation(hashAlgorithm); if (!(defaultHashImplementation != null)) { return(fallbackImplementation); } return(defaultHashImplementation); }
private void GenerateDefaultHashes(byte[] assemblyBytes) { Type[] typeArray = new Type[3] { Hash.GetHashIndexType(typeof(System.Security.Cryptography.SHA1)), Hash.GetHashIndexType(typeof(System.Security.Cryptography.SHA256)), Hash.GetHashIndexType(typeof(System.Security.Cryptography.MD5)) }; foreach (Type index in typeArray) { Type hashImplementation = Hash.GetDefaultHashImplementation(index); if (hashImplementation != (Type)null && !this.m_hashes.ContainsKey(index)) { this.m_hashes[index] = Hash.GenerateHash(hashImplementation, assemblyBytes); } } }
// Token: 0x06002ABF RID: 10943 RVA: 0x0009EA8C File Offset: 0x0009CC8C private void GenerateDefaultHashes(byte[] assemblyBytes) { Type[] array = new Type[] { Hash.GetHashIndexType(typeof(SHA1)), Hash.GetHashIndexType(typeof(SHA256)), Hash.GetHashIndexType(typeof(MD5)) }; foreach (Type type in array) { Type defaultHashImplementation = Hash.GetDefaultHashImplementation(type); if (defaultHashImplementation != null && !this.m_hashes.ContainsKey(type)) { this.m_hashes[type] = Hash.GenerateHash(defaultHashImplementation, assemblyBytes); } } }