Skip to content

Latest commit

 

History

History
134 lines (110 loc) · 5.35 KB

nf-certenroll-iobjectid-getalgorithmname.md

File metadata and controls

134 lines (110 loc) · 5.35 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:certenroll.IObjectId.GetAlgorithmName
IObjectId::GetAlgorithmName (certenroll.h)
Retrieves the display name associated with an algorithm object identifier (OID).
GetAlgorithmName
GetAlgorithmName method [Security]
GetAlgorithmName method [Security]
IObjectId interface
IObjectId interface [Security]
GetAlgorithmName method
IObjectId.GetAlgorithmName
IObjectId::GetAlgorithmName
certenroll/IObjectId::GetAlgorithmName
security.iobjectid_getalgorithmname
security\iobjectid_getalgorithmname.htm
security
3d24d658-1016-4e63-8d93-5db0a3144121
12/05/2018
GetAlgorithmName, GetAlgorithmName method [Security], GetAlgorithmName method [Security],IObjectId interface, IObjectId interface [Security],GetAlgorithmName method, IObjectId.GetAlgorithmName, IObjectId::GetAlgorithmName, certenroll/IObjectId::GetAlgorithmName, security.iobjectid_getalgorithmname
certenroll.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
CertEnroll.dll
Windows
19H1
IObjectId::GetAlgorithmName
certenroll/IObjectId::GetAlgorithmName
c++
APIRef
kbSyntax
COM
CertEnroll.dll
IObjectId.GetAlgorithmName

IObjectId::GetAlgorithmName

-description

The GetAlgorithmName method retrieves the display name associated with an algorithm object identifier (OID).

-parameters

-param GroupId [in]

An ObjectIdGroupId enumeration value that specifies the OID group to search. This can be any of the following algorithm groups:

  • XCN_CRYPT_HASH_ALG_OID_GROUP_ID
  • XCN_CRYPT_ENCRYPT_ALG_OID_GROUP_ID
  • XCN_CRYPT_PUBKEY_ALG_OID_GROUP_ID
  • XCN_CRYPT_SIGN_ALG_OID_GROUP_ID
In addition, you can also specify groups that do not contain cryptographic algorithms:
  • XCN_CRYPT_RDN_ATTR_OID_GROUP_ID
  • XCN_CRYPT_EXT_OR_ATTR_OID_GROUP_ID
  • XCN_CRYPT_ENHKEY_USAGE_OID_GROUP_ID
  • XCN_CRYPT_POLICY_OID_GROUP_ID
  • XCN_CRYPT_TEMPLATE_OID_GROUP_ID

-param KeyFlags [in]

An ObjectIdPublicKeyFlags enumeration value that specifies whether to search for a signing or an encryption algorithm. This can be one of the following values:

  • XCN_CRYPT_OID_INFO_PUBKEY_ANY
  • XCN_CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG
  • XCN_CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG
You can use either of the last two values to disambiguate among algorithms such as RSA that can be used to both encrypt and sign messages. You must also specify XCN_CRYPT_PUBKEY_ALG_OID_GROUP_ID in the GroupId parameter. Specify XCN_CRYPT_OID_INFO_PUBKEY_ANY if you set the GroupId parameter to anything other than XCN_CRYPT_PUBKEY_ALG_OID_GROUP_ID.

-param pstrAlgorithmName [out]

Pointer to a BSTR variable that contains the name.

-returns

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return code/value Description
CERTSRV_E_PROPERTY_EMPTY
The string that contains the algorithm name is empty.
OLE_E_BLANK
The algorithm name could not be found. You must call InitializeFromAlgorithmName before calling GetAlgorithmName.

-remarks

You can use the XCN_CRYPT_ENCRYPT_ALG_OID_GROUP_ID constant to create a GroupId parameter value that takes account of the key size for algorithms that can be identified by a variable bit length. For example, to initialize an IObjectId object from a 192-bit AES algorithm, specify "AES" for the strAlgorithmName parameter, shift the length left by 16, and perform a bitwise-OR combination on the shifted bit length and XCN_CRYPT_ENCRYPT_ALG_OID_GROUP_ID.

If you set the GroupId parameter to anything other than XCN_CRYPT_PUBKEY_ALG_OID_GROUP_ID, specify XCN_CRYPT_OID_INFO_PUBKEY_ANY for the KeyFlags parameter.

-see-also

IObjectId