ICLRStrongName Interface

Provides basic global static functions for signing assemblies with strong names. All ICLRStrongName methods return standard COM HRESULTs.

Methods

Method Description
GetHashFromAssemblyFile Method Gets a hash of the specified assembly file, using the specified hash algorithm.
GetHashFromAssemblyFileW Method Gets a hash of the assembly file specified as a Unicode string, using the specified hash algorithm.
GetHashFromBlob Method Gets a hash of the assembly at the specified memory address, using the specified hash algorithm.
GetHashFromFile Method Generates a hash over the contents of the specified file.
GetHashFromFileW Method Generates a hash over the contents of the file specified by a Unicode string.
GetHashFromHandle Method Generates a hash over the contents of the file with the specified file handle, using the specified hash algorithm.
StrongNameCompareAssemblies Method Determines whether two assemblies differ only by their strong name signatures.
StrongNameFreeBuffer Method Frees memory that was allocated with a previous call to a strong name method such as StrongNameGetPublicKey, StrongNameTokenFromPublicKey, or StrongNameSignatureGeneration.
StrongNameGetBlob Method Fills the specified buffer with the binary representation of the executable file at the specified address.
StrongNameGetBlobFromImage Method Gets a binary representation of the assembly image at the specified memory address.
StrongNameGetPublicKey Method Gets the public key from a private/public key pair.
StrongNameHashSize Method Gets the buffer size required for a hash, using the specified hash algorithm.
StrongNameKeyDelete Method Deletes the specified key container.
StrongNameKeyGen Method Creates a new public/private key pair for strong name use.
StrongNameKeyGenEx Method Generates a new public/private key pair with the specified key size for strong name use.
StrongNameKeyInstall Method Imports a public/private key pair into a container.
StrongNameSignatureGeneration Method Generates a strong name signature for the specified assembly.
StrongNameSignatureGenerationEx Method Generates a strong name signature for the specified assembly, based on the specified flags.
StrongNameSignatureSize Method Returns the size of the strong name signature.
StrongNameSignatureVerification Method Gets a value indicating whether the assembly manifest at the supplied path contains a strong name signature, which is verified according to the specified flags.
StrongNameSignatureVerificationEx Method Gets a value indicating whether the assembly manifest at the supplied path contains a strong name signature.
StrongNameSignatureVerificationFromImage Method Verifies that an assembly that has already been mapped to memory is valid for the associated public key.
StrongNameTokenFromAssembly Method Creates a strong name token from the specified assembly file.
StrongNameTokenFromAssemblyEx Method Creates a strong name token from the specified assembly file, and returns the public key.
StrongNameTokenFromPublicKey Method Gets a token representing a public key.

Remarks

You can get an instance of the ICLRStrongName by calling the ICLRRuntimeInfo::GetInterface method using CLSID_CLRStrongName and IID_ICLRStrongName as parameters.

Requirements

Platforms: See System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 4

See Also

Hosting Interfaces
Hosting