CryptoAPI Windows 7 支持

发布于 2024-08-06 21:52:20 字数 417 浏览 13 评论 0 原文

Microsoft 推出了下一代加密(CNG) 从 Vista 和 Server 2008 开始。但我的问题是知道微软是否支持旧的MS CAPI(例如,在 Windows 2003 和 Windows XP 中)。

谢谢拉杰

Microsoft 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回忆那么伤 2024-08-13 21:52:20

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

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

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.

青丝拂面 2024-08-13 21:52:20

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

尽管如此,只需尝试验证上下文:

#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);
    }
}

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);
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文