CertAlgIdToOID function
Use the CryptFindOIDInfo function instead of this function because ALG_ID identifiers are no longer supported in CNG. Use the CRYPT_OID_INFO_CNG_ALGID_KEY value in the dwKeyType parameter of the CryptFindOIDInfo function instead.
Windows Server 2003 and Windows XP:
The CertAlgIdToOID function converts a CryptoAPI algorithm identifier (ALG_ID) to an Abstract Syntax Notation One (ASN.1) object identifier (OID) string.
Syntax
LPCSTR WINAPI CertAlgIdToOID( _In_ DWORD dwAlgId );
Parameters
- dwAlgId [in]
-
Value to be converted to an OID.
Return value
If the function succeeds, the function returns the null-terminated OID string.
If no OID string corresponds to the algorithm identifier, the function returns NULL.
Examples
// EXAMPLE USING CertAlgIdToOID() to // convert the CALG_SHA algorithm identifier to an // Object Identifier string. //-------------------------------------------------------------------- // Declare variables. LPCSTR pszObjID = NULL; if(pszObjID = CertAlgIdToOID(CALG_SHA)) { printf("The OID for CALG_SHA is %s \n",pszObjID); } else { printf("No object identifier string correlates to the ALG_ID. \n"); }
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also