Gets the public key from a private/public key pair. The key pair can be supplied either as a key container name within a cryptographic service provider (CSP) or as a raw collection of bytes.
This function has been deprecated. Use the ICLRStrongName::StrongNameGetPublicKey method instead.
BOOLEAN StrongNameGetPublicKey ( [in] LPCWSTR szKeyContainer, [in] BYTE *pbKeyBlob, [in] ULONG cbKeyBlob, [out] BYTE **ppbPublicKeyBlob, [out] ULONG *pcbPublicKeyBlob );
[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 CSP. In this case,
StrongNameGetPublicKey extracts the public key from the key pair stored in the container.
pbKeyBlob is not null, the key pair is assumed to be contained in the key binary large object (BLOB).
The keys must be 1024-bit Rivest-Shamir-Adleman (RSA) signing keys. No other types of keys are supported at this time.
[in] A pointer to the public/private key pair. This pair is in the format created by the Win32
CryptExportKey function. If
pbKeyBlob is null, the key container specified by
szKeyContainer is assumed to contain the key pair.
[in] The size, in bytes, of
[out] The returned public key BLOB. The
ppbPublicKeyBlob parameter is allocated by the common language runtime and returned to the caller. The caller must free the memory by using the StrongNameFreeBuffer function.
[out] The size of the returned public key BLOB.
true on successful completion; otherwise,
The public key is contained in a PublicKeyBlob structure.
StrongNameGetPublicKey function does not complete successfully, call the StrongNameErrorInfo function to retrieve the last generated error.
Platforms: See System Requirements.
Library: Included as a resource in MsCorEE.dll
.NET Framework Versions: Available since 1.0