<PackageReference Include="System.Security.Permissions" Version="9.0.5" />

Hash

public sealed class Hash : EvidenceBase, ISerializable
Provides evidence about the hash value for an assembly. This class cannot be inherited.
public byte[] MD5 { get; }

Gets the MD5 hash value for the assembly.

public byte[] SHA1 { get; }

Gets the SHA1 hash value for the assembly.

public byte[] SHA256 { get; }

Gets the SHA256 hash value for the assembly.

public Hash(Assembly assembly)

Initializes a new instance of the Hash class.

public static Hash CreateMD5(byte[] md5)

Creates a Hash object that contains an MD5 hash value.

public static Hash CreateSHA1(byte[] sha1)

Creates a Hash object that contains a SHA1 hash value.

public static Hash CreateSHA256(byte[] sha256)

Creates a Hash object that contains a SHA256 hash value.

public byte[] GenerateHash(HashAlgorithm hashAlg)

Computes the hash value for the assembly using the specified hash algorithm.

Gets the SerializationInfo object with the parameter name and additional exception information.