PyCRYPTKEY.CryptExportKey

str = CryptExportKey(ExpKey, BlobType , Flags )

Exports key or key pair as an encrypted blob

Parameters

ExpKey : PyCRYPTKEY

Public key or session key of destination user. Use None if exporting a PUBLICKEYBLOB

BlobType : int

One of OPAQUEKEYBLOB,PRIVATEKEYBLOB,PUBLICKEYBLOB,SIMPLEBLOB,PLAINTEXTKEYBLOB,SYMMETRICWRAPKEYBLOB

Flags=0 : int

Combination of CRYPT_DESTROYKEY,CRYPT_SSL2_FALLBACK,CRYPT_OAEP or 0

Return Value

Returns a binary blob that can be imported via PyCRYPTPROV::CryptImportKey