Export (0) Print
Expand All

ICEnroll4::HashAlgID property

[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 put_HashAlgID(
  [in]   LONG hashAlgID
);

HRESULT get_HashAlgID(
  [out]  LONG *phashAlgID
);

Property value

A Long that represents the hash algorithm used when signing a PKCS #10 certificate request.

Error codes

If the property access methods put_HashAlgID and get_HashAlgID succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

Xenroll.h

Library

Uuid.lib

DLL

Xenroll.dll

IID

IID_ICEnroll4 is defined as c1f1188a-2eb5-4a80-841b-7e729a356d90

See also

ICEnroll4
ICEnroll3
CEnroll
HashAlgorithm
EnumAlgs

 

 

Community Additions

ADD
Show:
© 2015 Microsoft