CryptAcquireContext fails in Windows 10 Creators Update

柔情痞子 提交于 2019-12-11 16:58:22

问题


I have a code that encrypts a file using AES CFB mode. While the code runs correctly in Windows 7, Windows 8 and previous versions of Windows 10, on Windows 10 Creators Update this line fails:

if (!CryptAcquireContext(&hProv, NULL, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, 0))
{

    std::cout << "CryptAcquireContext Error\n";
    return 1;
}

What could be the reason for it?

P.S I saw that it is deprecated on MSDN, but I thought that function was so common.

来源:https://stackoverflow.com/questions/48622293/cryptacquirecontext-fails-in-windows-10-creators-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!