File: System\Deployment\Application\ComponentVerifier.cs
Project: System.Deployment.dll (System.Deployment)
#region Assembly System.Deployment, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Deployment.dll
#endregion
 
using System.Collections;
using System.Deployment.Application.Manifest;
using System.Deployment.Internal.Isolation.Manifest;
using System.IO;
using System.Security.Cryptography;
 
namespace System.Deployment.Application
{
    internal class ComponentVerifier
    {
        protected static CMS_HASH_DIGESTMETHOD[] _supportedDigestMethods;
        protected static CMS_HASH_TRANSFORM[] _supportedTransforms;
        protected ArrayList _verificationComponents;
 
        public ComponentVerifier();
 
        public static CMS_HASH_DIGESTMETHOD[] VerifiableDigestMethods { get; }
        public static CMS_HASH_TRANSFORM[] VerifiableTransformTypes { get; }
 
        public static byte[] GenerateDigestValue(string filePath, CMS_HASH_DIGESTMETHOD digestMethod, CMS_HASH_TRANSFORM transform);
        public static HashAlgorithm GetHashAlgorithm(CMS_HASH_DIGESTMETHOD digestMethod);
        public static Stream GetTransformedStream(string filePath, CMS_HASH_TRANSFORM transform);
        public static bool IsVerifiableHash(Hash hash);
        public static bool IsVerifiableHashCollection(HashCollection hashCollection);
        public static void VerifyFileHash(string filePath, Hash hash);
        public static void VerifyFileHash(string filePath, HashCollection hashCollection);
        public static void VerifySimplyNamedAssembly(string filePath, AssemblyManifest assemblyManifest);
        public static void VerifyStrongNameAssembly(string filePath, AssemblyManifest assemblyManifest);
        protected static void VerifyManifestComponentFiles(AssemblyManifest manifest, string componentPath, bool ignoreSelfReferentialFileHash);
        public void AddFileForVerification(string filePath, HashCollection verificationHashCollection);
        public void AddSimplyNamedAssemblyForVerification(string filePath, AssemblyManifest assemblyManifest);
        public void AddStrongNameAssemblyForVerification(string filePath, AssemblyManifest assemblyManifest);
        public void VerifyComponents();
 
        protected class FileComponent : VerificationComponent
        {
            protected string _filePath;
            protected HashCollection _hashCollection;
 
            public FileComponent(string filePath, HashCollection hashCollection);
 
            public override void Verify();
        }
        protected class SimplyNamedAssemblyComponent : VerificationComponent
        {
            protected AssemblyManifest _assemblyManifest;
            protected string _filePath;
 
            public SimplyNamedAssemblyComponent(string filePath, AssemblyManifest assemblyManifest);
 
            public override void Verify();
        }
        protected class StrongNameAssemblyComponent : VerificationComponent
        {
            protected AssemblyManifest _assemblyManifest;
            protected string _filePath;
 
            public StrongNameAssemblyComponent(string filePath, AssemblyManifest assemblyManifest);
 
            public override void Verify();
        }
        protected abstract class VerificationComponent
        {
            protected VerificationComponent();
 
            public abstract void Verify();
        }
    }
}