| Platform SDK: Certificate Enrollment Control |
The HashAlgID property specifies the hash algorithm to be used when signing the PKCS #10.
[Visual Basic] objEnroll.HashAlgID [ = hashAlgID] [C++] HRESULT put_HashAlgID( DWORD hashAlgID); HRESULT get_HashAlgID( DWORD* hashAlgID);
The values for this property are hash algorithm IDs, such as those returned by the ICEnroll3::EnumAlgs method. If both the HashAlgID and HashAlgorithm properties are set, whichever is last updated will specify which hash algorithm will be used to sign the PKCS #10.
// 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);
' Constant for CALG_MD4 (from wincrypt.h). Const CALG_MD4 = 32770 ' Set the hash algorithm ID. objXen.HashAlgID = CALG_MD4
Windows NT/2000: Requires Windows 2000.
Header: Declared in Xenroll.h.
Library: Use Uuid.lib.