开发者

cryptoapi windows 7 support

Mi开发者_开发技巧crosoft has introduced cryptography next generation (CNG) from Vista and server 2008 onwards. But my question is to know whether Microsoft supports the old MS CAPI (say for eg. in windows 2003 and windows xp) in Windows 7 and Server 2008.

Thanks

Raj


Do you mean if Windows 7 and Windows Server 2008 CryptoAPI is backwards compatible with older versions of CryptoAPI then yes.

All new CNG functionality is of course not.


Yes. Windows 7 provides both APIs: CNG and CAPI.

Nevertheless, just try with verfy context:

#include <Wincrypt.h>
#include <stdio.h>

int main()
{
    HCRYPTPROV hCryptProv = NULL;  
    if(CryptAcquireContext(&hCryptProv,NULL,NULL,PROV_RSA_FULL,CRYPT_VERIFYCONTEXT))                     
    {
        printf("CryptoAPI working\n\n");
        exit(0);    
    }else
    {
        printf("Error 0x%.8x",GetLastError());
        exit(1);
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜