It was reported elsewhere that the problem is that the default Crypto Provider is different for Windows 2000 and XP. It is Microsoft Base Cryptographic Provider (Rsabase.dll) for Windows 2000 and Microsoft Enhanced Cryptographic Provider (Rsaenh.dll) for Windows XP.
To fix it, try to set 'cprovidername' property of the _cryptapi class to "Microsoft Base Cryptographic Provider v1.0" which is value of dsMS_DEF_PROV_A constant in the wincrypt.h include file.
Writen by Sergey Berezniker
>Hello,
>
>I am using crypto API to encrypt some data on a WIn2000 machine, when I decrypt that data on a XP machine using crypto api again I get corrupted data. I have set the cprovidername on both machine to Microsoft Base Cryptographic Provider v1.0.
>
>What seems to be the problem ???
>
>Thanks
>
>Xavier
Venelina Jordanova
Outsourcing IT Services Ltd.