ICEnroll3::get_HashAlgID method (xenroll.h)

[This property is no longer available for use as of Windows Server 2008 and Windows Vista.]

The HashAlgID property sets or retrieves the hash algorithm used when signing a PKCS #10 certificate request.

This property was first introduced in the ICEnroll3 interface.

This property is read/write.

Syntax

HRESULT get_HashAlgID(
  LONG *hashAlgID
);

Parameters

hashAlgID

Return value

None

Remarks

The values for this property are hash algorithm IDs, such as those returned by the EnumAlgs method. If both the HashAlgID and HashAlgorithm properties are set, whichever has been updated most recently determines the hash algorithm used to sign the PKCS #10 request.

Examples

// Code to set the hash algorithm ID.
// hr is HRESULT variable.
hr = pEnroll->put_HashAlgID( CALG_MD4 );
if ( FAILED( hr ) )    
    printf("Failed put_HashAlgID [%x]\n", hr);


// Code to retrieve the hash algorithm ID.
DWORD dwHashID;

hr = pEnroll->get_HashAlgID( &dwHashID );
if ( FAILED( hr ) )    
    printf("Failed get_HashAlgID [%x]\n", hr);
else
    printf("HashAlgID: %d\n", dwHashID);

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header xenroll.h
Library Uuid.lib
DLL Xenroll.dll

See also

CEnroll

EnumAlgs

HashAlgorithm

ICEnroll3

ICEnroll4