Skip to content

Latest commit

 

History

History
199 lines (160 loc) · 6.2 KB

nf-certenroll-ismimecapability-initialize.md

File metadata and controls

199 lines (160 loc) · 6.2 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:certenroll.ISmimeCapability.Initialize
ISmimeCapability::Initialize (certenroll.h)
Initializes the object from a symmetric encryption algorithm object identifier (OID) and an optional key length.
ISmimeCapability interface [Security]
Initialize method
ISmimeCapability.Initialize
ISmimeCapability::Initialize
Initialize
Initialize method [Security]
Initialize method [Security]
ISmimeCapability interface
certenroll/ISmimeCapability::Initialize
security.ismimecapability_initialize_method
security\ismimecapability_initialize_method.htm
security
d972121d-ecfa-4a79-9322-dd0d0b81ba68
12/05/2018
ISmimeCapability interface [Security],Initialize method, ISmimeCapability.Initialize, ISmimeCapability::Initialize, Initialize, Initialize method [Security], Initialize method [Security],ISmimeCapability interface, certenroll/ISmimeCapability::Initialize, security.ismimecapability_initialize_method
certenroll.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
CertEnroll.dll
Windows
19H1
ISmimeCapability::Initialize
certenroll/ISmimeCapability::Initialize
c++
APIRef
kbSyntax
COM
CertEnroll.dll
ISmimeCapability.Initialize

ISmimeCapability::Initialize

-description

The Initialize method initializes the object from a symmetric encryption algorithm object identifier (OID) and an optional key length.

-parameters

-param pObjectId [in]

Pointer to an IObjectId interface that represents the OID.

-param BitCount [in]

A LONG variable that contains the bit length of the symmetric key.

-returns

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return code/value Description
CERTSRV_E_PROPERTY_EMPTY
The IObjectId pointer is NULL.

-remarks

The following symmetric encryption algorithms are supported by the Certificate Enrollment API. Only the RC2 and RC4 algorithms have variable key lengths that can be specified.

OID Key length Description
XCN_OID_OIWSEC_desCBC1.3.14.3.2.7 56 The key size is of the DES CBC algorithm is 56 bits. You do not need to specify this value.
XCN_OID_RSA_DES_EDE3_CBC1.2.840.113549.3.7 168 The key size is of the 3DES CBC algorithm is 168 bits. You do not need to specify this value.
XCN_OID_RSA_RC2CBC1.2.840.113549.3.2 40 to 128 RC4 is a variable key algorithm. common values are 40, 64, and 128 bits.
XCN_OID_RSA_RC41.2.840.113549.3.4 40 to 128 RC4 is a variable key algorithm. common values are 40, 64, and 128 bits.
XCN_OID_RSA_SMIMEalgCMS3DESwrap1.2.840.113549.1.9.16.3.6 168 The key size of the MMS Data Encryption Standard (DES) key wrap algorithm is 168 bits. You do not need to specify this value.
XCN_OID_RSA_SMIMEalgCMSRC2wrap1.2.840.113549.1.9.16.3.7 128 The key size of the MMS RC2 key wrap algorithm is 128 bits. You do not need to specify this value.
XCN_OID_NIST_AES128_CBC2.16.840.1.101.3.4.1.2 128 The key size is implied by the OID. You do not need to specify this value.
XCN_OID_NIST_AES192_CBC2.16.840.1.101.3.4.1.22 192 The key size is implied by the OID. You do not need to specify this value.
XCN_OID_NIST_AES256_CBC2.16.840.1.101.3.4.1.42 256 The key size is implied by the OID. You do not need to specify this value.
XCN_OID_NIST_AES128_WRAP2.16.840.1.101.3.4.1.5 128 The key size is implied by the OID. You do not need to specify this value.
XCN_OID_NIST_AES192_WRAP2.16.840.1.101.3.4.1.25 192 The key size is implied by the OID. You do not need to specify this value.
XCN_OID_NIST_AES256_WRAP2.16.840.1.101.3.4.1.45 256 The key size is implied by the OID. You do not need to specify this value.
 

The key length that you specify for RC2 and RC4 algorithms must be consistent with that supported by the cryptographic provider or providers used by the client. For more information, see ICspInformation. You can retrieve the bit length by calling the BitCount property, and you can retrieve the algorithm OID by calling the ObjectId property.

-see-also

ISmimeCapabilities

ISmimeCapability

IX509ExtensionSmimeCapabilities