IEnroll2::GetKeyLen method (xenroll.h)

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

The GetKeyLen method retrieves the minimum and maximum key lengths for the signature and exchange keys. This method was first defined in the IEnroll2 interface. The values retrieved by this method are dependent upon the current cryptographic service provider.

Syntax

HRESULT GetKeyLen(
  [in]  BOOL fMin,
  [in]  BOOL fExchange,
  [out] LONG *pdwKeySize
);

Parameters

[in] fMin

Boolean value indicating which key length (minimum or maximum) is retrieved. If fMin is TRUE, the minimum key length is retrieved; if it is FALSE, the maximum key length is retrieved.

[in] fExchange

Boolean value indicating the type of key. If fExchange is TRUE, the exchange key length is retrieved; if it is FALSE, the signature key length is retrieved.

[out] pdwKeySize

Pointer that receives the key's minimum or maximum length, in bits.

Return value

The return value is an HRESULT. A value of S_OK indicates success, and *pdwKeySize will be the value representing the length (in bits) for the key's minimum or maximum length.

Remarks

Call this method to determine the minimum and maximum key lengths. If a CSP does not support this method, an error is returned.

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

IEnroll2