0

微软从 Vista 和服务器 2008 开始引入了下一代加密技术(CNG) 。但我的问题是要知道Microsoft 是否在 Windows 7 和 Server 2008 中支持旧的MS CAPI(例如在 windows 2003 和 windows xp 中)

谢谢

拉吉

4

2 回答 2

1

您是说如果 Windows 7 和 Windows Server 2008 CryptoAPI 向后兼容旧版本的 CryptoAPI,那么是的。

当然不是所有新的 CNG 功能。

于 2009-10-07T14:19:43.790 回答
1

是的。Windows 7 提供了两种 API:CNG 和 CAPI。

不过,只需尝试使用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);
    }
}
于 2012-10-07T15:18:45.410 回答