Sdílet prostřednictvím


ICLRStrongName::StrongNameTokenFromPublicKey Method

Updated: July 2010

Gets a token that represents a public key. A strong name token is the shortened form of a public key.

BOOLEANStrongNameTokenFromPublicKey ( 
    [in]  BYTE    *pbPublicKeyBlob,
    [in]  ULONG   cbPublicKeyBlob,
    [out] BYTE    **ppbStrongNameToken,
    [out] ULONG   *pcbStrongNameToken
);

Parameters

  • pbPublicKeyBlob
    [in] A structure of type PublicKeyBlob that contains the public portion of the key pair used to generate the strong name signature.

  • cbPublicKeyBlob
    [in] The size, in bytes, of pbPublicKeyBlob.

  • ppbStrongNameToken
    [out] The strong name token corresponding to the key passed in pbPublicKeyBlob. The common language runtime allocates the memory in which to return the token. The caller must free this memory by using the ICLRStrongName::StrongNameFreeBuffer method.

  • pcbStrongNameToken
    [out] The size, in bytes, of the returned strong name token.

Return Value

true if the method completed successfully; otherwise, false.

Remarks

A strong name token is the shortened form of a public key that is used to save space when storing key information in metadata. Specifically, strong name tokens are used in assembly references to refer to the dependent assembly.

Requirements

Platforms: See .NET Framework System Requirements.

Header: MetaHost.h

Library: Included as a resource in mscoree.dll

.NET Framework Versions: 4

See Also

Reference

ICLRStrongName::StrongNameGetPublicKey Method

PublicKeyBlob Structure

ICLRStrongName Interface

Change History

Date

History

Reason

July 2010

Added topic.

Information enhancement.