PyCRYPTPROV.CryptGenKey

PyCRYPTKEY = CryptGenKey(Algid, Flags , KeyLen )

Generates a key pair or a session key

Parameters

Algid : int

Algorithm identifier, one of the CALG_* values, or AT_KEYEXCHANGE/AT_SIGNATURE

Flags : int

Combination of CRYPT_CREATE_SALT,CRYPT_EXPORTABLE,CRYPT_NO_SALT,CRYPT_PREGEN,CRYPT_USER_PROTECTED,CRYPT_ARCHIVABLE

KeyLen=0 : int

Length of key to generate, can be 0 to use provider's default key length

Comments

Differs from Api call in that the length is passed in separately