Export (0) Print
Expand All

StrongNameSignatureGeneration

Generates a strong name signature for the specified assembly. This method can either store the signature directly in the file, or return the signature to the caller.

Syntax

HRESULT StrongNameSignatureGeneration(
  LPCWSTR szFilePath,
  LPCWSTR szKeyContainer,
  BYTE *pbKeyBlob,
  ULONG cbKeyBlob,
  BYTE **ppbSignatureBlob,
  ULONG *pcbSignatureBlob
);

Parameters

szFilePath [in]
The path to the file that contains the manifest of the assembly for which to generate a strong name signature.
szKeyContainer [in]
The name of the key container that contains the public/private key pair. If pbKeyBlob is null, szKeyContainer must specify a valid container within the cryptographic service provider (CSP). In this case, StrongNameSignatureGeneration uses the key pair stored in the container to sign the file.

If pbKeyBlob is non-null, it is assumed that the key pair is contained in the key blob.

The keys must be 1024-bit Rivest-Shamir-Adleman (RSA) signing keys. No other types of keys are supported at this time.

pbKeyBlob [in]
A pointer to the public/private key pair. This pair is in the format created by the Win32 API CryptExportKey. If pbKeyBlob is null, it is assumed that the key container specified by szKeyContainer contains the key pair.
cbKeyBlob [in]
The size in bytes of pbKeyBlob.
ppbSignatureBlob [out]
A pointer to the location in which the common language runtime returns the signature. If ppbSignatureBlob is null, the runtime stores the signature in the file specified by szFilePath.

If ppbSignatureBlob is not null, the common language runtime allocates space in which to return the signature. The caller must free this space using StrongNameFreeBuffer.

pcbSignatureBlob [out]
The size in bytes of the returned signature.
Show:
© 2014 Microsoft